Skip to main content
Bluvy Tube
Press Esc to exit fullscreen
Volume m
/
i
Theater mode t
f
/
CSS text-box is newly baseline, and it's solves a common text layout issue. Here's how it works:

Keyboard shortcuts

Space K
Play / pause
← →
Back / forward 5 s
J L
Back / forward 10 s
0–9
Jump to 0%–90% of the video
Home End
Start / end
, .
Previous / next frame (while paused)
< >
Slower / faster
↑ ↓
Volume
M
Mute / unmute
C
Captions
F
Fullscreen
I
Picture-in-picture
T
Theater mode
?
Show this help

CSS text-box is newly baseline, and it's solves a common text layout issue. Here's how it works:

0 views Published on 19/08/2026 13:19
CSS text-box is newly baseline, and it's solves a common text layout issue. Here's how it works:
11 comments
?
As always, I love the way you manage to simplify a complex topic and explain it so well, thank you!
Lino Le Van @linolevan.com · 09/09/2026 16:41
Saw this when this video released and was like "when would I use this"... and then I had a text component that was centered using padding which became uncentered today. It did bite me later. Now I'm using text-box. You win this round @jakearchibald.com.
aliceif @aliceif.bsky.social · 19/08/2026 22:42
So everyone is going to trim to cap height and make letters like ÅÖŠ unreadable?
I am very much not hyped about this.
How do they become unreadable? In the video, when I trim to x-height, do the capitals become unreadable? Also, remember that padding is added in the example.
Matthias @matroe.bsky.social · 19/08/2026 18:58
finally! awesome
For `text-box-edge`

I think it's better to just call `text` as `normal` since that's what it is: do nothing—it's less confusing. I think the W3C Editors' Draft also left a note asking if `text` is a good choice. Maybe you can suggest it?

It also aligns with `text-box: normal;` shorthand.
It doesn't "do nothing", it discards half-leading.
As for `text-box-trim`, I think it's better to align it was well, instead of `none`, use `normal`. It makes sense too, `text-box-trim: normal;` = just do however the browser already handles it.
Dylan Forde @harmonicdesign.ca · 19/08/2026 15:10
Great explanation. Genuinely excited to be able to use this
niiiice
Bogdan Chadkin @trysound.io · 19/08/2026 13:42
So nice! Hope margin-trim is next, super helpful in design systems.
Follow along at bugzilla.mozilla.org/show_bug.cgi.... Some of the design of that feature is still in flux, but I mention it in tomorrow's video.
1506241 - (margin-trim) Implement the margin-trim property from CSS Box Level 4
NEW (nobody) in Core - Layout. Last updated 2026-08-17.
Best explanation ever about this :)
text-box CSS property - CSS | MDN
The text-box CSS property is a shorthand that corresponds to the text-box-trim and text-box-edge properties, which together specify the amount of space to trim from the block-start edge and block-end ...
The Firefox implementation of text-box was contributed by a community member, @sajidanwar.com.

This is a feature I've been wanting for a long time, as I know many of you have too.

So a huge thanks to Sajid for making it happen!
View original post on Bluesky
Link copied to clipboard

Sign in

Time to take a break

You've been watching videos for 30 minutes straight: give yourself 5 minutes away from the screen. Stand up, stretch, grab a glass of water… Your videos will be right here when you're back.