Re: [csswg-drafts] [css-text] Preventing too-short final lines of blocks (Last Line Minimum Length) (#3473)

> RESOLVED: Add a control that is either a property or a value that causes UAs to make the last line longer than it would've originally done unless that was a bad idea

Like `text-wrap-style: pretty`, this opts into a different line breaking algorithm aimed to make things look better, for some definition of better. And arguably, since the definition of `pretty` is quite open ended, a user agent could choose to implement `pretty` in just the right way to make nice last lines. But they might also do a whole lot more, and nothing requires that they pay special attention to the last line, and the performance profile between something that just cares about the last line and something that cares about the whole text is likely different. So we're basically looking at another variant of `pretty` but with a different bias in terms of what tradeoffs to make.

For the sake of the argument, let's call that `text-wrap-style: pretty-last-line`.

Both `pretty` and `pretty-last-line`:
* SHOULD bias for better layout over pure speed when making line breaking decisions
* SHOULD look at multiple lines for doing so
* are otherwise equivalent to `auto`

`pretty`: 
* SHOULD make the whole text pretty (which may involve making the last line not too short, avoiding rivers, avoiding starting 3 lines in a row with the word "the", or whatever else the browser wants to do for good typography's sake)
* MAY compromise performance while doing so

`pretty-last-line`:
* SHOULD make the last line pretty (i.e. not too short)
* SHOULD avoid making the rest ugly in the process (e.g. avoid excessive under filling of previous lines)
* SHOULD prioritize performance over whole-text-prettiness



-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3473#issuecomment-1882620093 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 9 January 2024 08:37:26 UTC