48 points soheilpro 1 hour ago 12 comments
CharlesW 41 minutes ago | parent
Since I’m in before the negativity: I love CSS! For whatever reason, it’s always made sense to me. I have great respect for everyone with the tenacity to push on improvements that might take 5-10 years to be in common use, if at all.
jamienk 26 minutes ago | parent
Still can't tree shake. It's what makes my old css files grow into monsters. I feel like everyone has given up on this.
afavour 22 minutes ago | parent
CSS modules ought to make it possible. But it’s more or less impossible with regular CSS, you have no idea when a class/ID might be used.
lopsotronic 21 minutes ago | parent
Been waiting a long time for CSS inherit() . . . although I freely admit that (and CSS Functions) open a respectable-sized can of worms. Sort of like what transclusion and conditionals do for document markup.
Anchor Positioning would be sweet and doesn't feel like it's got so much baggage.
lioeters 19 minutes ago | parent
Do we really want functions in CSS? I guess that ship has sailed a while ago, since CSS reached Turing completeness.
/* Define a function: */
@function --gradient-to-transparent(--color, --direction: bottom) {
result: linear-gradient(
to var(--direction),
var(--color),
transparent;
);
}
Why not provide better integration with JavaScript, to make this kind of acrobatics unnecessary.afavour 11 minutes ago | parent
Because JavaScript requires… a lot. A virtual machine, script parsing, etc. Making that a requirement before you even display any content on the page would be a regression.
lioeters 4 minutes ago | parent
I can see that, but CSS already requires a lot, no? Especially as they keep adding new features to it.
To me it feels like "programming in YAML", the way a declarative language/format acquires more and more features until you're writing functions in an awkward syntax that was never designed for it.
afavour 13 minutes ago | parent
I’m part of the seeming minority that really enjoys working with CSS. And the way I use it today is so different than I did a few years back, e.g CSS modules, declaring a palette with variables then changing it for dark mode… it’s genuinely great to work with.
techpression 6 minutes ago | parent
light-dark() is even better for that :) I also enjoy CSS, using @scope and @layer a lot with the :has() selector, it’s just so different now and I think most people are unaware.
koolala 4 minutes ago | parent
The new responsively-sized iframes standard is an exciting one for me not mentioned. It's finally a step beyond the original frames and framesets. It will let us design sites out of iframes as building blocks instead of needing to use web components.