Comprehensive article.<p>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.<p>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.<p>```
@use grid
@use container
@use layer<p>@layer layout {
.layout-grid {
--layout-grid-min: 30ch;
--layout-grid-gap: 3vw;<p><pre><code> display: grid;
grid-template-columns: repeat(
auto-fit,
minmax(min(100%, var(--layout-grid-min)), 1fr)
);
gap: var(--layout-grid-gap);
}</code></pre>
}<p>@layer layout {
:is(.layout-grid, .flex-layout-grid) > * {
container: var(--grid-item-container, grid-item) / inline-size;
}
}<p>```
Good resource, w/ useful examples, from a "here's how to start incorporating some of the new stuff" angle. For more of a "building things from first principles" foundation, I continue to recommend <a href="https://every-layout.dev" rel="nofollow noreferrer">https://every-layout.dev</a>.
2 questions:<p>- Is there a modern version of the CSS Zen Garden? <a href="https://www.csszengarden.com/" rel="nofollow noreferrer">https://www.csszengarden.com/</a> is very old<p>- From people who know CSS better than I do, do these features make TailwindCSS less useful / necessary? Though I'm sure much of the answer is "TailwindCSS is a different paradigm" since it's basically inline styles, and CSS is basically non-inline styles.
Sometimes I think I know everything that I need to know about web dev, but then I read something like this and learn about new features that I didn't know of.<p>I hope they think about deprecating some features or slowing down on adding features. Letting developers rely on transpilers is great way to keep the core language simple while letting people do anything they want.