Angular ๐Ÿ‡บ๐Ÿ‡ฆ - practical notes
1.63K subscribers
1.6K photos
1 file
532 links
Angular - practical notes

This group is for posting practical notes for Angular developers. Mostly all posts are for quick implementation https://t.me/angular_practical_notes (Commenting on posts only in ENG and UA langs here). Welcome!
Download Telegram
๐Ÿ“„ Handling CSS Precedence with @layer

#css #layer

In web design scenarios, developers typically use multiple CSS selectors and often have to override styles. Even though you donโ€™t override CSS styles with multiple selectors by yourself, every CSS block you write automatically overrides styles from the user-agent stylesheet. CSSโ€™s style overriding process happens based on the browserโ€™s specificity algorithm that calculates a weight for CSS selectors for handling precedence. In the past, every developer tweaked their CSS overriding-related code based on the specificity algorithm since they didnโ€™t have a way to handle CSS precedence without using confusing !important.
๐Ÿ‘1