News for hackers. Stuff that matters.
Re:Inline Scope for CSS by troupo on Monday October 14, 2024 @02:34AM (#41834804)
In component-based apps/systems C in CSS is often the last thing you want, if you ever want that.
Re:Inline Scope for CSS by mdhb on Monday October 14, 2024 @06:26AM (#41836114)
I know people get incredibly upset whenever this gets mentioned because suddenly they DO want it again but that was a big part of what “web components” were. When you need that level of isolation you can get it for free without any extra work.
Re:Inline Scope for CSS by troupo on Monday October 14, 2024 @08:31AM (#41836907)
Web Components are doing much more with isolation than just isolating styles.

You don't want/need to kill your a11y, form participation, and a bunch of other things (and laboriously solve them with Javascript) just because you want to scope your styles

Re:Inline Scope for CSS by mdhb on Monday October 14, 2024 @11:23AM (#41838374)
Form participation has been fixed for a while now for the record.
Re:Inline Scope for CSS by troupo on Monday October 14, 2024 @04:36PM (#41841697)
Yes, you have to manually set it up with javascript, or use a lib/framework that solves it for you automatically.

Too much hassle when all you need is style scoping