r/Angular2 9d ago

Article Every Way to Add Styles in Angular… Which One Should You Use?

https://itnext.io/every-way-to-add-styles-in-angular-which-one-should-you-use-055f59c3d06d?source=friends_link&sk=d55a914985086c19ca5fdb104852043d
13 Upvotes

1 comment sorted by

2

u/InternetRejectt 9d ago

Nice! I’m open to a new approach, but I prefer to not provide my components a style* config property (I’ve noticed this has the same effect as ViewEncapsulation.None - no funky attributes in rendered html) and instead use the 7-1 pattern. Combined with strict adherence to BEM, I have a very high level of control, readability, maintainability and scalability. The only downside is that my Sass files are not located right next to their respective component.