Especially functions.
Makes me think of a previous post from the author, who wrote 100k lines-of-code to power their blog.
Especially functions.
Makes me think of a previous post from the author, who wrote 100k lines-of-code to power their blog.
The example with linear-gradient is probably the best use case for them.
Also, even before reading the comments, I was pleasantly surprised that everything on that page worked and nothing bothered me. There is a good amount of attention to detail (switching of the rounding on codeblocks when switching to light mode for example, avoiding a weird corner on mobile). Nothing moves around on load etc. I know this is a low bar, but it's gotten pretty rare, even for pages linked on here.
I'm trying to say that his 100k lines might actually be spent on attention to detail and aren't just slop.
And you cannot emulate functions by using a preprocessor in all use cases.
But what bothers me is the governance model of CSS, the increasing complexity that leads ultimately to more framework usage, not to thoughtful engineering of accessible front ends.
Very soon CSS will be Turing complete and we can have a JavaScript-free C64 emulator. Yay.
We need basically control structures and full access to user input to achieve that.
And we can only hope the vendors get the sandboxing right this time, otherwise we will get a entire new class of CSS based browser exploits.