Anchor Positioning

Anchor positioning had me wondered for a while, however after reading some articles about it I think this is a great addition to modern css. Especially in use with some other new css/html additions like the popover api. And now support for Anchor positioning has landed in Safari 26 use in production is near (FireFox has it under a flag). I really like the absolute relative positioning and the baked in fallback on smaller screens. ... more

CSS units

CSS length units fall into two broad categories: absolute units, which map to fixed physical or reference measurements, and relative units, which resolve in relation to something else — a font metric, a parent element, the viewport, or a container. For front-end use it is widely accepted to use rem as the base unit, personally I seldom use px. If I do, most of the time it is in ascpect-ratio. From the newer units lh has quickly become one of my favourites. For mobile there is the ambivalent dvh. From the oldies it is em to use for proportional padding or margin. ... more

Embrace the Cascade

This is a plea for the power of the cascade — the C in CSS. Too many times I’ve read rants against it, and most of the time it comes down to a lack of understanding. The cascade is actually enormously helpful when it comes to styling, as long as you know what you are doing. There is no other frontend technique that lets you change the look and feel of an entire document with so little effort. The way the cascade works is very consistent and very logical, and now that @layer has been added to the mix, it is even easier to influence. ... more