Hacker News new | ask | show | jobs
by haukur 2680 days ago
What you linked is "CSS-in-JS" (in the sense that the library/framework you use transforms the output for you, for convenience, i.e., you're not writing BEM or whatever - same as in the original article). Vue scopes the styles by adding a data attribute.

https://vue-loader.vuejs.org/guide/scoped-css.html#scoped-cs...

Inspect the result here: https://codesandbox.io/s/3v0pjzoy7q