html

  • Vite in development and webpack in production is a real answer

    A 38-second dev server start on a machine with nothing else to do. Native ESM changes the feedback loop, and running two build tools has a specific cost.

  • IntersectionObserver for everything loading=lazy does not cover

    Native lazy loading covers images and iframes. Anything else that should happen when an element becomes visible still needs the observer — and it is the right tool.…

  • Fragments, and the wrapper div that stops being required

    Vue 2 required a single root element, so every component that logically returned two siblings had a wrapper div whose only purpose was satisfying the compiler. The dt…

  • Teleport, and the modal that no longer fights z-index

    A modal rendered inside a component is inside that component’s stacking context, so a parent with overflow: hidden or a transform clips it and no z-index helps. The…

  • Block patterns, and the page an editor can build

    Eleven custom blocks that exist to produce one layout. 5.5 added patterns, which is the feature the blocks were being used for — and it needs no build…

  • Native lazy loading arrived in core and is filterable

    5.5 adds loading=”lazy” to images in content automatically, which is a good default and is wrong for the first image on the page. Lazy-loading the hero image delays…

  • Lazy loading arrived in the browser

    One attribute replaces an IntersectionObserver and a library — and applying it to everything makes the Largest Contentful Paint worse rather than better.

  • A grid with minmax and no media queries

    A responsive card grid was a set of breakpoints each restating the column count, which is four rules describing one intention. The min(16rem, 100%) is the part usually…

  • loading=lazy, and the images it must not be on

    Deferring offscreen images used to mean an IntersectionObserver, a data attribute and a library. It is now an attribute the browser understands. Applying it to every image with…

  • Width and height are required again, and CLS is why

    Dropping the width and height attributes was correct advice for a decade of responsive design, and it is what makes a page jump while it loads. Browsers now…