14 ms·
It's alive and well in Vue.js single-file components (SFC). Once built, it is implemented by using data attributes in the CSS selectors. Component-scoped style
by ficklepickle 6y ago
It's alive and well in Vue.js single-file components (SFC). Once built, it is implemented by using data attributes in the CSS selectors.
Component-scoped styles is a very handy feature. It could be achieved just by leveraging selector specificity, but that's rather complex and a lot of people hate CSS so less cognitive overhead is better.
This is why I love Vue. It's basically the nightly version of HTML/CSS/JS. The syntax from this article is already familiar from Vue. It extends web standards, rather than replacing them, IMO.