https://github.com/maciejwwojcik/styling-host-elements-in-angular
Styling the host element is a crucial ability. Understanding that can completely change the way you develop reusable components, making their code clear and easier to maintain. This article will concentrate on techniques that use CSS styles and reduce Typescript logic.
https://github.com/maciejwwojcik/styling-host-elements-in-angular
angular style styling
Last synced: about 2 months ago
JSON representation
Styling the host element is a crucial ability. Understanding that can completely change the way you develop reusable components, making their code clear and easier to maintain. This article will concentrate on techniques that use CSS styles and reduce Typescript logic.
- Host: GitHub
- URL: https://github.com/maciejwwojcik/styling-host-elements-in-angular
- Owner: MaciejWWojcik
- Created: 2021-05-23T15:04:48.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-13T13:07:48.000Z (about 5 years ago)
- Last Synced: 2025-04-07T11:36:50.953Z (about 1 year ago)
- Topics: angular, style, styling
- Language: TypeScript
- Homepage: https://indepth.dev/posts/1469/techniques-to-style-component-host-element-in-angular
- Size: 153 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Styling Host Elements In Angular
This project includes example code used for this article https://indepth.dev/posts/1469/techniques-to-style-component-host-element-in-angular
## Techniques to style component host element
Styling the host element is a crucial ability. Understanding that can completely change the way you develop reusable components, making their code clear and easier to maintain. This article will concentrate on techniques that use CSS styles and reduce Typescript logic.
## Techniques used
- `HostBinding` decorator
- `:host` pseudo-class selector
- `:host-context` pseudo-class selector
## Contact
feel free to contact me:
- maciejwwojcik@gmail.com
- @maciej_wwojcik on Twitter