Passer au contenu principal
Bluvy Tube
Appuyez sur Échap pour quitter le plein écran
Volume m
/
i
Mode Cinéma t
f
/
CSS text-box is newly baseline, and it's solves a common text layout issue. Here's how it works:

Raccourcis clavier

Espace K
Lecture / pause
← →
Reculer / avancer de 5 s
J L
Reculer / avancer de 10 s
0–9
Aller à 0 %–90 % de la vidéo
Home End
Début / fin
, .
Image précédente / suivante (en pause)
< >
Ralentir / accélérer
↑ ↓
Volume
M
Couper / rétablir le son
C
Sous-titres
F
Plein écran
I
Image dans l’image
T
Mode cinéma
?
Afficher cette aide

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

0 vue Publié le 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 commentaires
?
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!
Voir le post d'origine sur Bluesky
Lien copié dans le presse-papier

Connexion

Il est temps de faire une pause

Ça fait 30 minutes que vous enchaînez les vidéos : accordez-vous 5 minutes loin de l'écran. Levez-vous, étirez-vous, buvez un verre d'eau… Les vidéos vous attendront ici.