Live data from Hacker News

Old dogs, new CSS tricks

mxb.dev

1–10 of 108 posts

Re: Old dogs, new CSS tricks

#2
This article is interesting but when we’re talking about design elements I think it’s always a good idea to include some actual demos or examples showing the final result and not just the “code”. I might also not be the target audience but I still don’t understand what container queries are or what old paradigm they’re replacing. The author does a good job explaining the difference between border-radius and the old way of using photoshop, but fails to do that for the features that he’s trying to promote.

Re: Old dogs, new CSS tricks

#3
CSS is becoming too complex. The syntax looks like it wants to be output by some compiler instead of being crafted by hand. Personally I also don't have any pleasure anymore writing CSS these days.

Sass and BEM methodology works fantastically well. Naming things isn't that hard, but Tailwind/utility approach is also extremely useful.

Those new features, besides container queries is just gibberish. Layer? WTF? The cascade is bad enough as it is, most devs can't even deal with the cascade it's why Tailwind become so popular. And we should dive even deeper into the cascade BS with layers and scoping and whatnpt? Again, this all looks like it was made to be output by some CSS compilers, not written by a developer.

Re: Old dogs, new CSS tricks

#4

CSS is becoming too complex. The syntax looks like it wants to be output by some compiler instead of being crafted by hand. Personally I also don't have any pleasure anymore writing CSS these days. Sass and BEM methodology works fantastically well. Naming things isn't that hard, but Tailwind/utility approach is also extremely useful. Those new features, besides container queries is just gibberish. Layer? WTF? The cas…

You don't have to use the new fancy features, you can keep doing things the old way.

Re: Old dogs, new CSS tricks

#5

CSS is becoming too complex. The syntax looks like it wants to be output by some compiler instead of being crafted by hand. Personally I also don't have any pleasure anymore writing CSS these days. Sass and BEM methodology works fantastically well. Naming things isn't that hard, but Tailwind/utility approach is also extremely useful. Those new features, besides container queries is just gibberish. Layer? WTF? The cas…

I’m unsure if you have specific feedback or just a general misunderstanding of the point of additions like layer to the spec.

At the end of the day these are all more tools in our toolbelt. If you want you can keep writing CSS the same way you always have.

Re: Old dogs, new CSS tricks

#6
post #4

CSS is becoming too complex. The syntax looks like it wants to be output by some compiler instead of being crafted by hand. Personally I also don't have any pleasure anymore writing CSS these days. Sass and BEM methodology works fantastically well. Naming things isn't that hard, but Tailwind/utility approach is also extremely useful. Those new features, besides container queries is just gibberish. Layer? WTF? The cas…

You don't have to use the new fancy features, you can keep doing things the old way.

I think he means other people will though.

Re: Old dogs, new CSS tricks

#7
> Quick question: how many of these have you actively used in production?

> Container Queries

I haven't used this, but it looks super useful.

> Style Queries

Eh, I'm sure this is useful for situations that don't come up very often.

> CSS Layers

Ugh, I'm not going to use this overly-complex silliness, and I'm not looking forward to debugging this when other people use this.

> Subgrid

Again, overly complex. Grid could already do everything this can do, more simply.

> Native Selector Nesting

I'm already using this.

> Anchor Positioning

Eh, I already had solutions to this problem, but this seems like it probably communicates intent a bit better. I guess I'll pick that up.

> :has, :is, :where

:has is useful

:is... okay, fine, syntactic sugar.

:where I don't believe in hell. If I did, I'd be against it because burning someone for eternity is inhumane. But I might be willing to make an exception for people who write CSS that requires you to read the MDN article on Specificity to understand it.

> Logical Properties

Perhaps useful for situations that don't come up very often. Seems complex, but that might be because the thing it's representing is inherently complex.

> Scroll-Linked Animations

Okay, someone who isn't me will probably do really cool things with this.

> View Transitions

Another thing that seems complex, but possibly because the thing it's representing is inherently complex.

Re: Old dogs, new CSS tricks

#8
post #5

CSS is becoming too complex. The syntax looks like it wants to be output by some compiler instead of being crafted by hand. Personally I also don't have any pleasure anymore writing CSS these days. Sass and BEM methodology works fantastically well. Naming things isn't that hard, but Tailwind/utility approach is also extremely useful. Those new features, besides container queries is just gibberish. Layer? WTF? The cas…

I’m unsure if you have specific feedback or just a general misunderstanding of the point of additions like layer to the spec. At the end of the day these are all more tools in our toolbelt. If you want you can keep writing CSS the same way you always have.

There is a concern that one can have too many tools to do the same -- or very similar -- things. This can reduce readability. Consider Perl's many ways approach to Python's (initial) goal of one way.

Re: Old dogs, new CSS tricks

#9

CSS is becoming too complex. The syntax looks like it wants to be output by some compiler instead of being crafted by hand. Personally I also don't have any pleasure anymore writing CSS these days. Sass and BEM methodology works fantastically well. Naming things isn't that hard, but Tailwind/utility approach is also extremely useful. Those new features, besides container queries is just gibberish. Layer? WTF? The cas…

Is your complaint about the features, or the syntax?

I think the syntax is good (getting better with nested selectors)

Re: Old dogs, new CSS tricks

#10

> Quick question: how many of these have you actively used in production? > Container Queries I haven't used this, but it looks super useful. > Style Queries Eh, I'm sure this is useful for situations that don't come up very often. > CSS Layers Ugh, I'm not going to use this overly-complex silliness, and I'm not looking forward to debugging this when other people use this. > Subgrid Again, overly complex. Grid could…

i actually came up with a thing where subgrid would be useful, since subgrid lets you denote that a child wants to use the same grid as the parent.

if you wanted to use grid template areas, and you had something that looked like

   
       Title
       
         
         
       
   
There isn't a great way to make the adhere to the grid template areas, because without subgrids only direct children (the ul) have coordinate attributes.
Post reply on HN