An open API service indexing awesome lists of open source software.

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.

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