Skip to main content

Harshal V. LADHE

All Content Tagged CSS

All content tagged with CSS, covering topics from layout to styling, properties, and modern specifications.

Content tagged css

  • Snippet::playing and :paused: Style Media by Playback State

    Style 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.
    Published at:
    Categories:CSS
    Estimated reading time:7 min read
  • Tutorial:contrast-color(): Automatic Readable Text on Any Background

    Let 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.
    Published at:
    Categories:CSS
    Estimated reading time:10 min read
  • Tutorial:min(), max(), and clamp() — CSS's Value-Bounding Functions

    Three 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.
    Published at:
    Categories:CSS
    Estimated reading time:5 min read
  • 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.
    Published at:
    Categories:CSS
    Estimated reading time:10 min read
  • Post:Advanced CSS @starting-style: Performance & Accessibility

    Series:CSS @starting-style: From First Render to Production (4/4)
    Ship 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.
    Published at:
    Categories:Animations
    Estimated reading time:27 min read