Re: [csswg-drafts] [css-text] Should text-wrap-style:balance be allowed to affect the block height? (#10186)

The CSS Working Group just discussed `[css-text] Should text-wrap-style:balance be allowed to affect the block height?`, and agreed to the following:

* `RESOLVED: Number of lines can change if it's 6+ lines being balanced, and note that this is about line breaks not content height shifts`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> jfkthame: Came up as I was fixing a bug<br>
&lt;fantasai> jfkthame: Spec requires that text-wrap: balance doesn't change the number of lines<br>
&lt;fantasai> jfkthame: thought an author might expect it doesn't affect the overall size of the block<br>
&lt;fantasai> jfkthame: I wondered if that was a correct expectation, or whether it's OK for it to alter the block height<br>
&lt;florian_irc> q+<br>
&lt;fantasai> jfkthame: currently that's not a constraint in Firefox<br>
&lt;astearns> ack florian_irc<br>
&lt;fantasai> florian_irc: In Firefox, is that constraint generally observed or always? Complicated wrt floats etc.<br>
&lt;fantasai> s/not a/a/<br>
&lt;fantasai> jfkthame: always<br>
&lt;astearns> ack fantasai<br>
&lt;dbaron> fantasai: when we wrote the spec it wasn't about wanting to restrict the height -- it was about the general case of not wanting the 2 line heading to become a 3 line heading because you turned on text-wrap:balance<br>
&lt;dbaron> fantasai: since then it's been brought up about balancing a larger number of lines, e.g., 20-30 or more.  At that point you might not care if a line is added/removed if you balance the text.<br>
&lt;dbaron> astearns: we have a current limit at 10, implementations may be more restrictive<br>
&lt;dbaron> fantasai: not required to do more than 10, but can<br>
&lt;florian_irc> q+<br>
&lt;dbaron> fantasai: I don't think we should restrict effects on the block height.  Changing the way text wraps can change the height of the lines.  Maintaining a stable height wasn't particularly the goal of the feature.<br>
&lt;dbaron> fantasai: Instead, we should say for a small number of lines (e.g., &lt; 8) then the restriction should stay, but for more than that (betwen 6 and 10) the number of lines can change.<br>
&lt;astearns> ack florian_irc<br>
&lt;dbaron> fantasai: Trying not to change it but might shift by 1 or 2 lines.  Enables some faster algorithms which might make larger numbers of lines more possible.<br>
&lt;fantasai> florian_irc: agree with fantasai, also curious about firefox<br>
&lt;fantasai> florian_irc: did you implement this way for a specific reason?<br>
&lt;fantasai> jfkthame: it was fallout from fixing a different bug<br>
&lt;fantasai> jfkthame: that ended up with ensuring that the height doesn't change, that wasn't a specific demand<br>
&lt;fantasai> florian_irc: in that case, the current definition is maybe too specific about precisely how much balancing is the right amount<br>
&lt;fantasai> florian_irc: maybe we shouldn't require the the Firefox behavior, but allow some amount of discretion<br>
&lt;fantasai> florian_irc: might want to balance other considerations<br>
&lt;fantasai> astearns: the method to evaluate whether to evaluate whether something is more balanced<br>
&lt;fantasai> astearns: it's not "you must achieve this", but if you hadn't done this then the line breaks you're considering are not more balanced<br>
&lt;fantasai> astearns: seems we could resolve on loosening the requirement on changing number of lines if number of lines balancing is a larger number<br>
&lt;fantasai> astearns: maybe other things fall out from that<br>
&lt;dbaron> (and is it clear that the requirement is about "number of lines" rather than about "height")<br>
&lt;fantasai> florian_irc: if we don't require FF behavior, should make that clear<br>
&lt;dbaron> fantasai: if we change it so the # of lines is possible to change that will be more obvious<br>
&lt;fantasai> astearns: might still be worth clarifying<br>
&lt;fantasai> astearns: proposed that we relax the restriction on changing the number of lines, and clarify it's only about number of line breaks not resulting height<br>
&lt;fantasai> [discussing what's the limit]<br>
&lt;fantasai> PROPOSED: Number of lines can change if it's more than 6-ish lines being balanced<br>
&lt;fantasai> RESOLVED: Number of lines can change if it's 6+ lines being balanced, and note that this is about line breaks not content height shifts<br>
</details>


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


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

Received on Wednesday, 24 April 2024 15:32:40 UTC