Andreu Botella @andreubotella.com · 26/05/2026Brian's blog post goes in more depth on line-clamp, but it gets rid of the 3-property cruft you need before -webkit-line-clamp will do anything, and it also adds a `line-clamp: auto` syntax to be able to clamp to whatever content fits a given height. It even lets you animate that height! 131
Andreu Botella @andreubotella.com · 27/01/2026Today in the CSS face-to-face meeting we're discussing line-clamp, which is something I've been working on fixing for years. The meeting is in Apple's offices in Cupertino, California, so I'm not attending in person because fuck traveling to the US. This is gonna be my camera feed though: 100
Andreu Botella @andreubotella.com · 27/08/2025The behavior I would have expected would be something like this: 0% means 1 line, 100% means the full number of lines, and everything is evenly spaced. So clamping by `floor(1 + (percentage / 100) * (numLines - 1))`. 100
Andreu Botella @andreubotella.com · 27/08/2025This is the smallest values that trigger clamping by that many lines, on a test with 5 lines. From what I can tell, it behaves like clamping by `max(1, floor((percentage / 100) * (numLines + 1)))` lines. The `numLines + 1` multiplier means you can clamp by the full number of lines (5 here) with 84% 100
Andreu Botella @andreubotella.com · 06/05/2025I'm pumped about the enum JS proposal, (that makes enums part of core JS, not just TS) -- not so much because of the proposal itself, but because one of the possible future directions for it would finally let JS evolve to crab. 🦀 020