Browser Support and Compatibility
Checking feature support across browsers, and writing CSS and JavaScript that degrade gracefully where a feature isn't yet available.
Content tagged browser-support
Snippet:
:playingand:paused: Style Media by Playback StateStyle audio and video players from their playback state.Style audio and video by playback state with CSS :playing, :paused, :buffering and :muted, plus :has() patterns and a JavaScript fallback.Post:An Interactive Guide to CSS Keyframes
Bring static designs to life with keyframesMaster multi-step CSS animations using @keyframes. Learn control, performance, GPU optimization, and advanced web motion.Post:Backwards-Compatible JavaScript: Polyfills and Baseline
Use new JavaScript without breaking older browsers.Write backwards-compatible JavaScript: feature detection, safe core-js polyfills, transpiling vs polyfilling, Baseline and browserslist queries.Tutorial:Conditional CSS Values with the
if()FunctionSwap CSS values by media, supports, or style conditions.The if() function picks between several values inside one CSS declaration based on a media(), supports(), or style() condition — collapsing what used to require duplicating an entire rule under @media/@supports, or a JS class toggle, into one line, with a fallback for browsers that don't support it yet.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.