Skip to main content

Harshal V. LADHE

Responsive Design Techniques

Building layouts, type, and spacing that adapt smoothly to every screen size, from small phones to wide desktops.

Content tagged responsive-design

  • 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
  • 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:Dynamic Viewport Height Units: dvh, svh, and lvh

    Tracks the mobile address bar's actual visible height live.
    100vh has always meant the LARGEST possible viewport on mobile, so content sits behind the address bar until it's scrolled away. svh assumes the smallest viewport, lvh assumes the largest, and dvh is the only one of the three that tracks the browser chrome's actual current state, live.
    Published at:
    Categories:CSS
    Estimated reading time:7 min read
  • Tutorial:Dynamic Viewport Width Units: dvw, svw, and lvw

    Width-axis siblings of dvh/svh/lvh, useful for full-bleed breakouts.
    dvw, svw, and lvw mirror dvh/svh/lvh onto the width axis, but the browser chrome that makes dvh diverge from vh is a vertical UI element — so on virtually every current browser, all four width units render identically. Where they actually earn their place is different: full-bleed breakouts and edge-to-edge mobile carousels, not a live-resizing address bar.
    Published at:
    Categories:CSS
    Estimated reading time:6 min read
  • Tutorial:Fluid Typography and Spacing with clamp()

    One clamp() declaration scales type, padding, and gaps smoothly — no breakpoint ladder.
    clamp(min, preferred, max) — with a preferred value built from rem plus a viewport or container-relative unit — scales font-size, padding, and gaps continuously between a floor and ceiling instead of jumping at fixed breakpoints, replacing a media-query ladder with one line per property.
    Published at:
    Categories:CSS
    Estimated reading time:9 min read