Skip to main content

Harshal V. LADHE

Tutorials

Browse tutorials

Follow-along guides that build something real from the ground up, one step at a time.

  • Viewport Inline & Block Units: vi and vb

    vi and vb behave like vw and vh in the default horizontal-tb writing mode, but unlike vw/vh they aren't tied to a fixed screen direction — switch to a vertical writing mode and the two swap, with vi tracking height and vb tracking width. They also resolve against the root element's writing-mode specifically, never a locally-scoped one, which is the detail most likely to trip someone up.
    Category: CSSLast modified: September 2026
  • Dynamic Viewport Width Units: dvw, svw, and lvw

    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.
    Category: CSSLast modified: September 2026
  • Dynamic Viewport Height Units: dvh, svh, and lvh

    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.
    Category: CSSLast modified: September 2026
  • Hinting Layer Promotion with will-change

    will-change hints to the browser that a property is about to change, letting it promote an element to its own compositor layer ahead of time instead of during the first frame of a transition. A live sandbox compares no hint, always-on, and the recommended toggle-before/after pattern against the element's real, live will-change value.
    Category: CSSLast modified: September 2026
  • Fluid Typography and Spacing with clamp()

    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.
    Category: CSSLast modified: September 2026
  • min(), max(), and clamp() — CSS's Value-Bounding Functions

    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.
    Category: CSSLast modified: September 2026
  • Padding Around the Notch with env()

    The env() CSS function reads environment variables the browser defines outside your stylesheet — most commonly the four safe-area-inset-* values — letting fixed/sticky content pad itself around a device's notch, home indicator, or rounded corners without hardcoding per-device pixel values.
    Category: CSSLast modified: September 2026
  • One-Line Theme-Aware Colors with light-dark()

    The light-dark() CSS function collapses a light value and a dark value into one declaration, resolved by color-scheme — no duplicate custom properties, no @media (prefers-color-scheme) block per themed property.
    Category: CSSLast modified: September 2026
  • Exponential Backoff with Jitter

    Enhance your retry logic with 'Full Jitter' to decohere client requests and protect your infrastructure during recovery.
    Category: JavaScriptLast modified: September 2026
  • Exponential Backoff Retry Utility

    A production-ready recursive utility to retry failed asynchronous operations with a configurable delay that doubles and caps to prevent infinite wait times.
    Category: JavaScriptLast modified: September 2026
  • The Holy Grail Layout (Grid Edition)

    Build the classic Holy Grail layout using modern CSS Grid — a clean, responsive header, sidebars, main content, and footer without floats or layout hacks.
    Category: CSSLast modified: September 2026