Hacker News new | ask | show | jobs
by somishere 2136 days ago
Ah, so you mean a scoped stylesheet included in the same file as the rest of your component markup. Agreed this is a useful pattern in the right circumstances! Depending on your build process (and how you're using components), in the old days this method just saw a global stylesheet deployed as usual, except with automated / custom scoping applied via data attributes. Do web components use shadow-dom style scoping now?
1 comments

> so you mean a scoped stylesheet included in the same file

Exactly - perhaps 'colocated styles' might be a better term than 'inline styles'.

> Do web components use shadow-dom style scoping now

Not sure, I don't use or know much about Web Components (the technology) - by 'component' I just mean the web framework pattern of modularising a bunch of markup/behaviour (and styles if you agree with the arguments in the article!)