In the days of CSS frameworks such as Bootstrap, Foundation, and Bulma the emphasis was always on components. The frameworks would provide modals,...
For further actions, you may consider blocking this person and/or reporting abuse
You probably won't be able to use purge css to discard unnecessary css with the method you're advocating here since the classes won't already exist on the markup for purgecss to find.
That may or may not matter to you, but I think worth mentioning.
Thanks for the reply! I actually wrote about how to get the right purgecss extractor in a previous article to use this type of setup.
dev.to/drewtownchi/finding-the-rig...
I think I may have invented something even more transparent but similar, take a look at this.
🎩 JavaScript Enhanced SCSS mixins! 🎩 Making CSS scopes with CSS variables.
Adam Crockett ・ Jul 26 ・ 2 min read
In the above post, It's not the fact that it's a scope implementation, it's the implications of JavaScript directly from scss.