Skip to main content

Harshal V. LADHE

Mastering CSS Media Queries

Mastering CSS Media Queries for creating responsive designs that adjust based on screen size, orientation, and other device characteristics.

Content tagged media-queries

  • Post:CSS Container Queries Deep Dive: Named Containers, cqi Units, and Style Queries

    Make 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.
    Published at:
    Categories:CSS
    Estimated reading time:25 min read
  • Tutorial:Conditional CSS Values with the if() Function

    Swap 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.
    Published at:
    Categories:CSS
    Estimated reading time:6 min read
  • Post:Responsive CSS Grid Layouts: fr Units, minmax(), auto-fill, and auto-fit Explained

    Series:CSS Grid Fundamentals (3/3)
    Smarter layouts without rigid breakpoints.
    Learn how to build truly responsive CSS Grid layouts using "fr" units, "minmax()", "auto-fit", "auto-fill", and modern media & container queries.
    Published at:
    Categories:CSS
    Estimated reading time:11 min read