| Comprehensive article. I’ve long given up trying to keep up with everything added to the spec since about `display: flex`. There’s just too much stuff, and the shoehorning of features into a syntax/spec from 1996 doesn’t appear to me to be a sustainable long term strategy to facilitate increasingly complex web applications. Maybe it’s been considered, but some use of namespaces and modules in the syntax could at least help developers opt into specific CSS modules and let other developers know what magic they can expect to find in the stylesheet. ```
@use grid
@use container
@use layer @layer layout {
.layout-grid {
--layout-grid-min: 30ch;
--layout-grid-gap: 3vw; display: grid;
grid-template-columns: repeat(
auto-fit,
minmax(min(100%, var(--layout-grid-min)), 1fr)
);
gap: var(--layout-grid-gap);
}
}@layer layout {
:is(.layout-grid, .flex-layout-grid) > * {
container: var(--grid-item-container, grid-item) / inline-size;
}
} ``` |
When the Web exploded onto us the first time (late 90s) html and css were limited, and JavaScript mostly unused, so the door opened to lots of "untrained" [1] people to make a living building Web sites.
Explosion number 2 comes the the aughts, and is characterised by the split of "front end" and "back end". FrontPage, WordPress, and other site builders lower the barrier to entry, and make Web design accessible to the common man.
If one comes up through these ranks then the train of new css, new javascript, even new html can seem daunting.
For those who came in "easy" it just seems like things are getting more and more complex. Whereas to those who are used to "programming is hard", these are fantastic additions which make so much more possible.
The good news is that you dont actually have to keep up. A flex based site is perfectly fine. A marketing company, staffed with creatives, think WordPress is perfect, and discussions about CSS are pretty shallow. They find a theme and move on. The theme-makers however love this progress in css.
So yeah, whether you're writing css or c or whatever the language-of-the-month is this week, stuff moves quickly.
[1] by untrained here, I mean people without programming training. The language of that time was c++ or c, both of which required a deep understanding of programing.