All Content Tagged CSS
All content tagged with CSS, covering topics from layout to styling, properties, and modern specifications.
Content tagged css
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.Tutorial:
contrast-color(): Automatic Readable Text on Any BackgroundLet CSS choose readable white or black text automatically.Use CSS contrast-color() to pick white or black text for any background colour: how the spec defines it, custom properties and brand colours, buttons and tags, pairing with light-dark(), mid-tone limits, and an @supports fallback.Tutorial:
min(),max(), andclamp()— CSS's Value-Bounding FunctionsThree comparison functions that pick a value from a rule, without a single media query.min(), max(), and clamp() pick the smallest, largest, or a bounded value from a list of CSS expressions at the point of use, replacing media-query-driven overrides for readable measures, safe-area-aware insets, and bounded widths with one declaration each.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.