CSS Articles

    Modern CSS techniques, layout tricks, animations, and design system patterns for the modern web.

    How to animate elements along an SVG path using CSS offset-path
    CSS8 min

    How to animate elements along an SVG path using CSS offset-path

    Explains how to use the CSS Motion Path API to move elements along complex vector paths without JavaScript. Covers responsive path scaling and controlling element rotation along the curve.

    Editor: Paul Radford
    Oct 11, 2026
    animationfrontend
    Fixing anchor link offset behind sticky headers with CSS scroll-padding
    CSS8 min

    Fixing anchor link offset behind sticky headers with CSS scroll-padding

    Explains how to use scroll-padding and scroll-margin to prevent anchor links from scrolling underneath fixed or sticky headers. Replaces old JavaScript offset calculations with native CSS.

    Editor: Paul Radford
    Sep 16, 2026
    layoutfrontend
    Modern CSS Layout: Grid, Container Queries & Positioning
    CSS11 min

    Modern CSS Layout: Grid, Container Queries & Positioning

    A guide to the CSS layout features that matter now: container queries, subgrid, masonry, anchor positioning, and logical properties.

    Editor: Paul Radford
    Aug 23, 2026
    layoutcontainer-queriesanchor-positioninglogical-properties
    CSS Animation & Motion in 2026
    CSS9 min

    CSS Animation & Motion in 2026

    A guide to the four CSS-native techniques replacing JavaScript animation libraries: view transitions, scroll-driven animation, @starting-style, and @property.

    Editor: Paul Radford
    Aug 21, 2026
    css animationview transitions apiscroll-driven animationsstarting-stylecss propertyweb motion
    Modern CSS Selectors, Cascade & Conditional Logic in 2026
    CSS12 min

    Modern CSS Selectors, Cascade & Conditional Logic in 2026

    A working map of :has(), cascade layers, @scope and @when/@else, and how they change the way you write CSS in 2026.

    Editor: Paul Radford
    Aug 21, 2026
    selectorscascade layershas selectorscopeconditional css
    How to use the advanced CSS attr() function for types and units
    CSS7 min

    How to use the advanced CSS attr() function for types and units

    attr(data-color color, #333) feeding straight into background-color sounds like it already ships, but as of early 2026 it's spec-only. Here's what attr() actually does today, and what's coming.

    Editor: Paul Radford
    Jul 26, 2026
    selectorsfrontend
    Animating to height auto using CSS interpolate-size
    CSS8 min

    Animating to height auto using CSS interpolate-size

    height: auto was never a number the browser could interpolate toward, which is exactly why it never animated at all. These two features finally give the engine something concrete to target.

    Editor: Paul Radford
    Jul 20, 2026
    animationlayoutfrontend
    Serving responsive background images with the CSS image-set function
    CSS7 min

    Serving responsive background images with the CSS image-set function

    Three separate min-resolution media query blocks plus an @supports check for WebP used to be needed just to keep background images in sync. image-set() resolves all of that on its own now.

    Editor: Paul Radford
    Jul 2, 2026