text-wrap: balance ends the one-word last line
Use it on headings. Browsers cap it at a few lines, so it is cheap.
h1, h2 { text-wrap: balance; }Hassan
Hafez
Senior Product Engineer. 10+ years shipping products, from pixels to production.
text-wrap: balance ends the one-word last lineUse it on headings. Browsers cap it at a few lines, so it is cheap.
h1, h2 { text-wrap: balance; }inert beats aria-hidden for off-screen UIOne attribute removes the element from the tab order and the accessibility tree, so nothing can focus into a hidden panel.
scrollbar-gutter: stable stops the layout shiftReserve the scrollbar’s space up front and the page stops jumping when content grows past the fold.