- From: Roman Komarov via GitHub <noreply@w3.org>
- Date: Sun, 11 Jan 2026 23:12:34 +0000
- To: public-css-archive@w3.org
kizu has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-text-4] text-align-first == I was playing with `text-align-last`, and noticed an issue that was at some point discussed but was decided to postpone for later and, I guess, never revisited (https://lists.w3.org/Archives/Public/www-style/2013Aug/0391.html) Basically, if we have just one line, then `text-align-last` overrides the `text-align`/`text-align-all`. This is not the effect you sometimes want — you could want the first line to be start-aligned, and only if it _overflows_ make the last line end-aligned, for example. But adding `text-align-last: end` makes it so that the _only_ line will be end-aligned, without a way to make it start-aligned. I think the best way to handle this would be to add a `text-align-first` property. This would also allow defining three different alignments: for the first line, for the last line, and for anything in-between. One visual style that this will allow to do is basically this: ``` | A single non-overflowing line. | ``` ``` | Two lines that will overflow with | | the second line end-aligned. | ``` ``` | Three lines overflowing, | | with the middle line centered | | and the last line end-aligned. | ``` With `text-wrap: balance`, the last case can appear more often, as this visual style makes more sense when all lines have approximately the same length. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13330 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 11 January 2026 23:12:36 UTC