Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 2.07 KB

README.md

File metadata and controls

32 lines (20 loc) · 2.07 KB

Customizable style

Author: Thomas Laforge

Styling is an important part of a day job of a frontend developer often underestimated. In Angular application, I often see people use @Input() to customize the style of their component. But @Input() should be used only for the logic and we should use other technique for styling. We can take advantage of css variable and host-context.

In this challenge, you will need to use both to delete all @Input() from your code.

Styling is an important aspect of a frontend developer's day job, but it is often underestimated. In Angular applications, I frequently see people using @Input() to customize the style of their components. However, @Input() should only be used for logic; and other techniques, such as CSS variables and host-context, should be used for styling.

In this challenge, you will need to use both CSS variables and :host-context to remove all @Input() from your code.

Constraints:

  • In your final submission, your component should not contain any lines of code. All styling should be handled within the decorator (or external css files if you prefer)

Submitting your work

  1. Fork the project
  2. clone it
  3. npm ci
  4. nx serve styling
  5. ...work on it
  6. Commit your work
  7. Submit a PR with a title beginning with Answer:13 that I will review and other dev can review.

styling styling solution author

You can ask any question on twitter