The survey results from the State of CSS aren’t out yet, but they made this landing page that randomly shows you what one person wrote to answer that question. Just clicking the reload button a bunch, I get the sense that the top answers are:
- Container Queries
- Parent Selectors
- Nesting
- Something extremely odd that doesn’t really make sense and makes me wonder about people
Container queries its top Of my list. Other nice to have would be the ability to style a select and transition to auto height/width (it sucks having to use JS to do this).
My top one has to be the ability to use some sort of variables in keyframes.
(When I first heart of environment variables, I thought they were it, but nope, I was wrong, they’re something else I can’t really see any use for.)
Let’s say we have
n
elements, each with an indexi
from0
ton - 1
. And let’s say we want to set a repeating animation that has them in the initial state between0%
andi*100%/n
and in the final state between(i + 1)*100%/n
and100%
. This cannot be achieved withanimation-delay
as the first elements will spend more of the animation in the final state and the last ones more in the initial one. So at this point, our only solution is creatingn
sets of very similar@keyframes
, one for each element. Extremely fustrating.Here’s an example – the keyframes have to be generated in a Sass loop.