Re: [csswg-drafts] [css-text] Rename `text-wrap-style: avoid-orphans` (#11283)

The CSS Working Group just discussed ``[css-text] Rename `text-wrap-style: avoid-orphans` ``, and agreed to the following:

* `RESOLVED: rename avoid-orphans to avoid-short-last-line`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> jensimmons: text-wrap:pretty is defined to do many different things to make it prettier<br>
&lt;TabAtkins> jensimmons: i propose to have a new value that *only* avoids orphans (word by itself on the last line of a paragraph)<br>
&lt;TabAtkins> jensimmons: similar to chrome's current bheavior anyway<br>
&lt;TabAtkins> jensimmons: it's proposed as avoid-orphans. that's actually a widow, adn the names are bad anyway<br>
&lt;TabAtkins> jensimmons: lots of suggestions, i think all the names are bad<br>
&lt;astearns> not just a word by itself, very short lines with more than one word should also be avoided<br>
&lt;TabAtkins> jensimmons: if you read thru it, i think `avoid-short-last-line` is best so far<br>
&lt;florian_irc> q+<br>
&lt;TabAtkins> jensimmons: we can bikeshed the name if needed, but even if we don't have the name decided on i'd like to switch to avoid-short-last-line *for now*<br>
&lt;kizu> q+<br>
&lt;TabAtkins> +1 to abandoning the orphan/widow terminology<br>
&lt;lea> q+<br>
&lt;TabAtkins> I have *never* remembe3red which is which anyway<br>
&lt;TabAtkins> florian_irc: agree with the problem, and the temporary problem<br>
&lt;TabAtkins> florian_irc: and the suggested name isn't wrong in an international context, it doesn't mention "words". that's nice<br>
&lt;TabAtkins> florian_irc: would like something shorter, but this'll do<br>
&lt;astearns> ack florian_irc<br>
&lt;TabAtkins> fantasai: one idea is avoid-short-lines? i guess we want to avoid short lines in general<br>
&lt;TabAtkins> astearns: this is just about last lines<br>
&lt;astearns> ack fantasai<br>
&lt;TabAtkins> fantasai: so a short line in the center of a paragraph is okay?<br>
&lt;TabAtkins> jensimmons: yeah this doesn't handle that<br>
&lt;TabAtkins> florian_irc: nuance: if the penultimate line is short, it would somewhat balance that against the last line<br>
&lt;TabAtkins> florian_irc: but wouldn't touch a line in the middle<br>
&lt;astearns> q+<br>
&lt;TabAtkins> jensimmons: so if you have one line with a short word, followed by a long word, in a narrow column. right now the long word will wrap.<br>
&lt;ChrisL> Supercalifragilisticexpialidocious<br>
&lt;TabAtkins> jensimmons: which will leave you with a short line in the middle of the paragraph. and this feature isn't trying to mitigate that.<br>
&lt;astearns> ack kizu<br>
&lt;TabAtkins> jensimmons: so i think it's best to be specific with "avoid-short-last-line"<br>
&lt;TabAtkins> kizu: i think i like this term even if the value is long<br>
&lt;TabAtkins> kizu: you won't use it that often, and it's very understandable<br>
&lt;ntim> q+<br>
&lt;jensimmons> q+<br>
&lt;TabAtkins> kizu: looking at all the other values i think they're all a bit too wide in what they cover<br>
&lt;astearns> ack lea<br>
&lt;TabAtkins> lea: right now this is a flag, essentially<br>
&lt;TabAtkins> lea: a lot of typesetting programs give designers more control over orphan prevention<br>
&lt;TabAtkins> lea: that woudl change naming conventions<br>
&lt;florian_irc> q?<br>
&lt;TabAtkins> lea: number of words, or % of content area<br>
&lt;TabAtkins> lea: that would give us different names to work with<br>
&lt;florian_irc> q+ to respond to lea<br>
&lt;TabAtkins> lea: and more ability, probably with an auto value to let the UA choose<br>
&lt;kurt> q+<br>
&lt;TabAtkins> lea: it's not just about orphans, if you have a very long line even two words looks bad<br>
&lt;TabAtkins> lea: but i do agree changing the word "orphan"<br>
&lt;TabAtkins> lea: orphan is used in both words and lines, typographically. confusing because you dont' know which it's referring to<br>
&lt;TabAtkins> florian_irc: and it' bad in both cases<br>
&lt;astearns> ack florian_irc<br>
&lt;Zakim> florian_irc, you wanted to respond to lea<br>
&lt;TabAtkins> florian_irc: i disagree with giving fine-grained controls, there's so many fine-grained things you might want to set, you have to not only set those but also their priorities<br>
&lt;TabAtkins> florian_irc: you end up with a toolbox of many knobs, most of the parameter space is nonsensical. think letting the browser figure it out is more often better.<br>
&lt;lea> q?<br>
&lt;TabAtkins> florian_irc: but if we do want to do that, it's a big problem, file a separat eissue. but i'd rather not<br>
&lt;TabAtkins> astearns: i agree mostly with florian. InDesign doesn't let you choose a % of content length<br>
&lt;TabAtkins> astearns: it's complicated on what effect this has on other lines in the paragraph<br>
&lt;TabAtkins> astearns: it's not okay to implement this as putting an nbsp in the last two words<br>
&lt;TabAtkins> astearns: the spec should say something like "use the facilities you have in text-wrap:pretty to avoid a short last line"<br>
&lt;TabAtkins> astearns: if the overall line-breaking for a paragraph cannot be improved, we will sometimes still get a short last line<br>
&lt;astearns> ack ntim<br>
&lt;TabAtkins> astearns: so the spec should say that this is a bit subtle, not a dumb switch<br>
&lt;astearns> ack astearns<br>
&lt;TabAtkins> florian_irc: right, its' "avoid", not "forbid"<br>
&lt;TabAtkins> ntim: iirc, avoid-orphans was one of the ways to mitigate the perf problems of text-wrap:pretty<br>
&lt;TabAtkins> ntim: should it be a name that's easy to remember, then, so people are more likely to use it rather than pretty?<br>
&lt;TabAtkins> ntim: "pretty" is short and easy to use<br>
&lt;TabAtkins> florian_irc: so rename "pretty" to "please-use-nice-typography-if-you-can"<br>
&lt;TabAtkins> florian_irc: it would be nice to find a shorter name, yeah<br>
&lt;TabAtkins> ntim: yeah, would just be nice to encourage people to use the new value<br>
&lt;TabAtkins> fantasai: i think the fact that it's obvious what it does might actually encourage people<br>
&lt;astearns> ack jensimmons<br>
&lt;TabAtkins> astearns: and if you can come up with a better name, feel free to suggest it<br>
&lt;TabAtkins> jensimmons: i think avoid-short-last-lines is good because it is flexible enough to handle all scripts<br>
&lt;TabAtkins> jensimmons: and it's very clear what it is, no prior typographic education<br>
&lt;TabAtkins> jensimmons: if you've never known typograph stuff, you read this property, you see this value and you think you know waht it does right away. that's a good quality<br>
&lt;TabAtkins> jensimmons: i think we've been prioritizing those two qualities *over* a short word<br>
&lt;bkardell> I like `avoid-short-last-lines` - it is clear... +1 to what jensimmons is saying rightnow<br>
&lt;TabAtkins> jensimmons: dont' think we'll really find a shorther phrase. trick is a lot of people havne't thought about this before, so we ahve to name all the pieces<br>
&lt;TabAtkins> jensimmons: there is a question of if we need this at all, i think perf of "pretty" shoudl be fine anyway unless they have ridiculous paragraphs<br>
&lt;kbabbitt> q+<br>
&lt;TabAtkins> jensimmons: but it does give browsers some flexibility to avoid messing up "pretty"<br>
&lt;TabAtkins> jensimmons: and to address alan's concerns about the precise definition, it does go to some details about that already. you have to look at multiple lines<br>
&lt;TabAtkins> jensimmons: there's a lot of MAY in there<br>
&lt;astearns> ack kurt<br>
&lt;TabAtkins> jensimmons: you'll see a lot of different choices if you open the same text in chrome and safari, that's fine<br>
&lt;kurt> https://drafts.csswg.org/css-break/#widows-orphans<br>
&lt;TabAtkins> kurt: there's a property for widows and orphans in css-break already<br>
&lt;TabAtkins> kurt: does that hit the same problems?<br>
&lt;TabAtkins> jensimmons: yeah, those affect the first/last lines of a paragraph around a break<br>
&lt;astearns> ack kbabbitt<br>
&lt;TabAtkins> astearns: if we had to replace those we'd need an alias anyway. but this is a new term<br>
&lt;TabAtkins> kbabbitt: among these terms i like avoid-short-last-line best, yeah<br>
&lt;TabAtkins> kbabbitt: isn't there a property... the use-case is finding the right balance of quality vs perf<br>
&lt;TabAtkins> kbabbitt: there's another set of propertites about image-rendering that also hint about quality vs perf<br>
&lt;TabAtkins> TabAtkins: image-rendering, yeah<br>
&lt;TabAtkins> kbabbitt: can those names apply<br>
&lt;iank_> q+<br>
&lt;TabAtkins> TabAtkins: we have deprecated optimizequality and optimizespeed. they mean the same thing. the other values are all specific about what's happening. so if we want to draw a parallel, it's similar to what's being proposed ehre, with specific details about what's happening<br>
&lt;TabAtkins> jensimmons: and we dont' want to necessarliy say "speed", computers get faster, algos get better. don't want to tie a behavior to taht based on current perf considerations that might change later<br>
&lt;TabAtkins> jensimmons: if you turn on the feature flag in the recent version, webkit's pretty does a lot of work.<br>
&lt;TabAtkins> jensimmons: doesn't handle rivers yet, but it's a lot more than what chrome does right now<br>
&lt;TabAtkins> jensimmons: and the perf is great<br>
&lt;TabAtkins> jensimmons: i need to do some more testing, but afaik you can put it on as many elements as you want<br>
&lt;TabAtkins> jensimmons: concern is that i fyou have one element that's hundreds or thousands of lines long, you might see an issue<br>
&lt;TabAtkins> jensimmons: so if you just have zero paragraph breaks at all in a long article, that's the area that might be slow. but otherwise is fine.<br>
&lt;astearns> ack iank_<br>
&lt;TabAtkins> jensimmons: that's also why i hesitate warning people off of pretty<br>
&lt;TabAtkins> iank_: for perf, we don't see on the low end devices getting faster year over year. they're getting cheaper, isntead<br>
&lt;TabAtkins> iank_: that's been true for many years now<br>
&lt;TabAtkins> iank_: i think we're positioned to have the msot users in that segment.<br>
&lt;TabAtkins> iank_: so yeah, perf in the high end is getting better, but on the low end it's static, and we have the biggest slice of that market<br>
&lt;TabAtkins> jensimmons: good point. iphone 16e is pretty fast<br>
&lt;TabAtkins> astearns: so i think we're ready to rename avoid-orphans to avoid-short-last-line<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: rename avoid-orphans to avoid-short-last-line<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11283#issuecomment-2776875912 using your GitHub account


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

Received on Thursday, 3 April 2025 20:43:39 UTC