Live data from Hacker News

Inline Scope for CSS

picostitch.com

31–40 of 43 posts

Re: Inline Scope for CSS

#31
post #12

> I am not tightly following what's going on in CSS land, since blogs are not the thing and mailing lists became spam lists I don't know where to "listen". Two resources: * https://2023.stateofcss.com/en-US/features/ * https://tailwindcss.com/ Keeping track of TailwindCSS updates is nice, even for non-users: since they "live and breathe" CSS, seeing what they are up to is a good strategy to stay current with CSS deve…

I really wouldn’t say Tailwind does anything that resembles living and breathing CSS. Their entire value proposition is making shit copy and pastable by ignoring the “C” in CSS and then doing further things to kind of reduce how much you need to know about writing CSS like just making everything a class for example. I know a lot of people like it but it’s considered a very flawed solution in a lot of ways by people w…

This guy is absolutely right - the C in CSS stands for cascading.

What Tailwind is doing is rewriting the whole thing that CSS is and putting it into easy-to-write classes. This could be handy to you, yes, but unfortunately you're missing the whole point of CSS which is to have cascaded stylings.

To help you understand this a little bit better, one could have a look at why CSS was invented and where it comes from:

In the desktop publishing world (books, newspapers, etc.) this kind of cascading layout rules were used long before there was the first HTML page on the web. This should be nothing to be mixed up with regular programming. Change your view on that thing and you will understand.

It may sound harsh but Tailwind is a way to tell "I'm a programmer, I don't understand CSS and I'm not further interested into".

Re: Inline Scope for CSS

#32
post #12

> I am not tightly following what's going on in CSS land, since blogs are not the thing and mailing lists became spam lists I don't know where to "listen". Two resources: * https://2023.stateofcss.com/en-US/features/ * https://tailwindcss.com/ Keeping track of TailwindCSS updates is nice, even for non-users: since they "live and breathe" CSS, seeing what they are up to is a good strategy to stay current with CSS deve…

I really wouldn’t say Tailwind does anything that resembles living and breathing CSS. Their entire value proposition is making shit copy and pastable by ignoring the “C” in CSS and then doing further things to kind of reduce how much you need to know about writing CSS like just making everything a class for example. I know a lot of people like it but it’s considered a very flawed solution in a lot of ways by people w…

You're right in that it undoes the cascading bit, but that's the bit that a lot of people don't want. The updates to CSS are rarely about how it cascades, so it _does_ follow the majority of updates.

Also, if you look at the docs, the mapping between class and styles are the first thing you're given. IMO it doesn't hide anything about the models browsers use to build things like grids, for example

Re: Inline Scope for CSS

#33
post #7
post #2

Firefox is planning on it: https://bugzilla.mozilla.org/show_bug.cgi?id=1830512

They're always planning things and always last at things. Even for the most visible and painful cross-browser issues, they always last. One thing being service workers on extensions: available in Chrome since 2020 and we're closing 2024 still without them in Firefox. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

Firefox is absolutely not always last at things. Chrome, Safari and Firefox are all often first, and all often last.

Chrome tends to ship things its team comes up with first, and things the rest come up with last. (This should not be considered surprising, for any team.) It tends to ship things half-baked (specification incomplete, or buggy implementation, though that latter isn’t as common as it was ten years ago), and often things both Safari and Firefox deem harmful. Firefox and Safari tend more to ship things only when they’re complete (specification and their implementation).

Especially in cases like this, Firefox was the first mover (), but then (simplifying the story slightly) Chrome nudged development in a different direction (because of Shadow DOM considerations, I think), and so Firefox eventually removed what they’d done and saying they’d wait until the dust had really settled before implementing again.

Re: Inline Scope for CSS

#35
post #31
post #12

Earlier quoted context omitted.

I really wouldn’t say Tailwind does anything that resembles living and breathing CSS. Their entire value proposition is making shit copy and pastable by ignoring the “C” in CSS and then doing further things to kind of reduce how much you need to know about writing CSS like just making everything a class for example. I know a lot of people like it but it’s considered a very flawed solution in a lot of ways by people w…

This guy is absolutely right - the C in CSS stands for cascading. What Tailwind is doing is rewriting the whole thing that CSS is and putting it into easy-to-write classes. This could be handy to you, yes, but unfortunately you're missing the whole point of CSS which is to have cascaded stylings. To help you understand this a little bit better, one could have a look at why CSS was invented and where it comes from: In…

Cascading may be good for publishing, but the many benefits of cascading don't really play in your favor when you are trying to use the web as a platform to make _applications_. Documents are mostly static; apps have a lot of moving parts. Apps are a lot more complex than documents.

Re: Inline Scope for CSS

#36

> I am not tightly following what's going on in CSS land, since blogs are not the thing and mailing lists became spam lists I don't know where to "listen". Two resources: * https://2023.stateofcss.com/en-US/features/ * https://tailwindcss.com/ Keeping track of TailwindCSS updates is nice, even for non-users: since they "live and breathe" CSS, seeing what they are up to is a good strategy to stay current with CSS deve…

[deleted]

Re: Inline Scope for CSS

#37
post #17
post #12

Earlier quoted context omitted.

I really wouldn’t say Tailwind does anything that resembles living and breathing CSS. Their entire value proposition is making shit copy and pastable by ignoring the “C” in CSS and then doing further things to kind of reduce how much you need to know about writing CSS like just making everything a class for example. I know a lot of people like it but it’s considered a very flawed solution in a lot of ways by people w…

In component-based apps/systems C in CSS is often the last thing you want, if you ever want that.

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

#38
post #19
post #12

Earlier quoted context omitted.

I really wouldn’t say Tailwind does anything that resembles living and breathing CSS. Their entire value proposition is making shit copy and pastable by ignoring the “C” in CSS and then doing further things to kind of reduce how much you need to know about writing CSS like just making everything a class for example. I know a lot of people like it but it’s considered a very flawed solution in a lot of ways by people w…

[dead]

I don’t say this with any snark at all, there’s a lot of people with a lot of different use cases and I think Tailwind is actually a great fit for anyone who doesn’t know CSS.

I’m a bit less enthusiastic about people who consider themselves to be front end web developers by profession who in practice seem to only know a single JS framework and somehow skipped over HTML, CSS and how to do anything with JavaScript using standard Web APIs. Tailwind is also incredibly popular in that community but I feel very differently about it there.

Re: Inline Scope for CSS

#39
post #30
post #6

At some point, we really have to kill CSS.

You can stop using it today if you want to.

That is as good as saying "stop using Google" when it is everywhere on the web.

But CSS is adding new features every day and sunrise again should be the sign that it is a poor abstraction.

Re: Inline Scope for CSS

#40
post #37
post #17

Earlier quoted context omitted.

In component-based apps/systems C in CSS is often the last thing you want, if you ever want that.

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.

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

Post reply on HN