Re: [csswg-drafts] [css-overflow-4] [css-break] How does `widows` and similar properties affecting fragmentation interact with `continue: discard`? (#9235)

The CSS Working Group just discussed ``[css-overflow-4] [css-break] How does `widows` and similar properties affecting fragmentation interact with `continue: discard`?``, and agreed to the following:

* `RESOLVED: The region break set by line-clamp ignores widows/orphans`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> s/Topic/Subtopic/<br>
&lt;fantasai> s/Topic/Subtopic/<br>
&lt;fantasai> s/Topic/Subtopic/<br>
&lt;fantasai> andreubotella: Here's an implementation of continue:collapse. You can see when the height is reduced to zero, the lines get hidden one by one.<br>
&lt;fantasai> andreubotella: continue:discard is the previous version of this, which was handled with fragmentation<br>
&lt;fantasai> andreubotella: You don't see the same thing, you see that first two lines are hidden together<br>
&lt;fantasai> andreubotella: If you only leave space for first line, both discarded.<br>
&lt;fantasai> andreubotella: Reason for this is 2 properties called widows/orphans<br>
&lt;fantasai> andreubotella: Names are typographical terms, somewhat confusing, maybe we need to rename? But that's off-topic<br>
&lt;fantasai> andreubotella: They control how many lines can be by themselves at the start or end of a fragment<br>
&lt;fantasai> andreubotella: The default value is 2, meaning a single fragment isn't allowed<br>
&lt;astearns> fantasai: do you have an incorrect assumption?<br>
&lt;astearns> fantasai: widows shouldn’t affect the first fragment<br>
&lt;fantasai> fantasai: There's no breaking opportunity between the start of the container and its first line box<br>
&lt;fantasai> fantasai: You will always place at least some content<br>
&lt;astearns> ack fantasai<br>
&lt;fantasai> florian: If you have a 2-line paragraph, and a many line paragraph ... in fragmentation it is what you want, but in this case maybe not<br>
&lt;fantasai> florian: My suggestion is that line-clamp also sets widows/orphans to 1.<br>
&lt;fantasai> florian: Otherwise if there's room for 3 lines, and you only get 2, it will be surprising<br>
&lt;astearns> ack dbaron<br>
&lt;fantasai> andreubotella: My suggestion was to make line-clamp ignore widows/orphans<br>
&lt;fantasai> dbaron: Principle is that you always place something.<br>
&lt;fantasai> dbaron: One reason it exists is not getting into an infinite loop when all fragmentainers are identical.<br>
&lt;fantasai> dbaron: In this case, you have to place something.<br>
&lt;fantasai> dbaron: In context where fragmentainers are not all identical, you may or may not want that principle.<br>
&lt;fantasai> dbaron: But I think we're coming to another solution here...<br>
&lt;fantasai> florian: Andreu's and mine would do the same thing by default, but mine allows authors to set things so that they do take effect, whereas in Andreu's there's no option<br>
&lt;fantasai> astearns: Chair hat off, I'm a little more comfortable with just defining interaction between the properties, rather than having one property set another...<br>
&lt;fantasai> florian: I'm split here. Andreu's version is less magic<br>
&lt;fantasai> florian: If you're doing a very small height in which you're line-clamping, but if people are doing it on a bigger chunk of content, room for 10 lines<br>
&lt;fantasai> florian: maybe in that case would want to have widows and orphans take effect<br>
&lt;fantasai> florian: Completely suppressing most of the time might not be the right call<br>
&lt;astearns> fantasai: suppose you have clamp that’s large and you are fragmenting?<br>
&lt;astearns> fantasai: there you’d want widows to take effect<br>
&lt;fantasai> andreubotella: Question of whether line-clamp container should fragment. It's very buggy and non-interop in browsers.<br>
&lt;fantasai> andreubotella: If we allow these containers to fragment, then probably continue:discard, rather than block effects of this property, it should say that they don't apply for setting the region break<br>
&lt;fantasai> florian: Ok, my earlier pref for setting to 1 rather than ignoring, is not an objection. I'm now on the fence, see arguments both ways.<br>
&lt;fantasai> florian: Long-term, if we really need an opt-in, we can create one.<br>
&lt;fantasai> astearns: Let's go with andreubotella's suggestion for now. It's the least we can do to fix this particular issue.<br>
&lt;fantasai> astearns: We can make that interaction more complicated in the future if we need to<br>
&lt;fantasai> PROPOSED: The region break set by line-clamp ignores widows/orphans<br>
&lt;fantasai> RESOLVED: The region break set by line-clamp ignores widows/orphans<br>
</details>


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


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

Received on Wednesday, 17 September 2025 15:38:36 UTC