Exploring Modern CSS Features and Future Specs
Stay updated with the latest CSS specifications, including subgrid, container queries, the :has() selector, and high-level layout modules.
Content tagged modern-css
Tutorial:A Modern CSS Reset, Explained Rule by Rule
A small, modern reset, and the reason behind every line.A compact modern CSS reset, explained rule by rule: border-box sizing, margin removal, keyword animations with interpolate-size, readable line-height, block-level media, form controls that inherit your font, overflow-wrap and text-wrap for better line breaks, and an isolated stacking context — plus optional extras and the edge cases to watch for.Post:Advanced CSS
@starting-style: Performance & AccessibilityShip smooth, accessible, framework-friendly CSS entry animations.Keep @starting-style fast and accessible: rendering performance, prefers-reduced-motion, framework use, and comparisons with @keyframes and View Transitions.Tutorial:CSS
@scope: Component-Level Style IsolationLimit where selectors match, with donut scopes and proximity.Use CSS @scope to keep component styles inside a root, stop them at a donut-scope limit, and let scope proximity fix nested themes.Post:CSS Cascade Layers (
@layer): End Specificity Wars in Large CodebasesControl CSS priority with layer order, not specificity.Learn how CSS cascade layers (@layer) set priority by layer order instead of specificity — unlayered styles, the !important reversal, revert-layer, layering third-party CSS, the full cascade sort order, migrating a large codebase and putting utility classes last.Post:CSS Container Queries Deep Dive: Named Containers,
cqiUnits, and Style QueriesMake components respond to their container, not the viewport.Go beyond basic @container: inline-size vs size containment, named containers, cqi/cqb/cqmin/cqmax units, and style queries, with diagrams and a live sandbox.