DEV Community

Discussion on: How To Stop Writing Messy & Unscalable CSS

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen

I only tried CSS Modules based on this small React sample: create-react-app.dev/docs/adding-a....

Angular can use either shadow DOM or use what they call emulated view encapsulation which similar to CSS modules assigns unique selectors to each class used in a component. However, the component uses a regular stylesheet and applies regular classes to the HTML elements, the framework does the wiring up.

Thread Thread
 
bytomray profile image
Tom Ray

Interesting. Thanks Lars. Iā€™m going to give CSS modules a shot šŸ‘

Thread Thread
 
layzee profile image
Lars Gyrup Brink Nielsen

I absolutely love them when combined with React.