Re: [csswg-drafts] [css-overflow-4] compat work-around for line-clamp (#10324)

The CSS Working Group just discussed `[css-overflow-4] compat work-around for line-clamp`, and agreed to the following:

* `RESOLVED: -webkit-line-clamp with display: -webkit-box or -webkit-vertical-box establishes a BFC as described in the issue. Open new issue on timing of blockification (computed vs used)`
* `RESOLVED: The previous resolution also applies to unprefixed line-clamp`
* `ACTION Ian to open the above issue`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> florian: same contxt as 10323<br>
&lt;fantasai> florian: We need to make some legacy compat workarounds due to -webkit-line-clamp<br>
&lt;fantasai> florian: it can't quite be exactly the same because -webkit-line-clamp doesn't apply to any block<br>
&lt;fantasai> florian: need to first use -webkit-box and something else<br>
&lt;andreubotella> -webkit-box-orient: vertical<br>
&lt;fantasai> florian: if you don't have these, the prefixed version is supposed to do nothing<br>
&lt;fantasai> florian: changing that is a compat problem<br>
&lt;fantasai> florian: the "how do we preserve that weirdness" question is answered differently in each<br>
&lt;fantasai> florian: the collapsed version assumes a single anonymous flex child and moves effect of line-clamping from flexbox to its child<br>
&lt;fantasai> florian: if it actually has multiple children, it applies to all<br>
&lt;fantasai> florian: Andreu's approach is better<br>
&lt;fantasai> florian: if applying both line-clamp and -webkit-box  it becomes a BFC instead of a flexbox<br>
&lt;iank_> q+<br>
&lt;fantasai> florian: which is good for eventually getting rid of -webkit-box<br>
&lt;fantasai> florian: so I propose replacing the spec with Andreu's approach<br>
&lt;fantasai> andreubotella: this is what Blink was already doing<br>
&lt;fantasai> andreubotella: and I think it is also close to what FF is doing<br>
&lt;astearns> ack iank_<br>
&lt;fantasai> iank_: we switched our behavior 3-4 years ago<br>
&lt;fantasai> iank_: previously each of the items would get clamped individually, which is not at all what people want<br>
&lt;fantasai> iank_: so when we switched, we created a BFC and everyone was happy<br>
&lt;emilio> q+<br>
&lt;astearns> ack emilio<br>
&lt;fantasai> emilio: Fwiw, Firefox does the same<br>
&lt;fantasai> emilio: we also switched awhile ago<br>
&lt;fantasai> emilio: because people started relying on Blink's behavior, and it's better anyhow<br>
&lt;emilio> https://bugzilla.mozilla.org/show_bug.cgi?id=1786147 fwiw<br>
&lt;emilio> q+<br>
&lt;fantasai> PROPOSED: -webkit-line-clamp with display: -webkit-box or -webkit-vertical-box establishes a BFC as described in the issue<br>
&lt;fantasai> andreubotella: I want to confirm WebKit is OK with this<br>
&lt;fantasai> andreubotella: since it has some observable effects<br>
&lt;emeyer> fantasai: I'm pretty sure we'd like to get rid of all the weirdness<br>
&lt;fantasai> fantasai: and if FF and Blink are shipping, then we can have some confidence that it's compatible to implement<br>
&lt;fantasai> astearns: proposed to accept the proposal in the issue<br>
&lt;fantasai> emilio: When does this happen?<br>
&lt;fantasai> emilio: difference between FF and Blink<br>
&lt;fantasai> emilio: Blink will [missed]<br>
&lt;fantasai> emilio: and Firefox will [missed other]<br>
&lt;fantasai> florian: Whichever is easier?<br>
&lt;fantasai> emilio: I think it's easier at computed-value time<br>
&lt;fantasai> +1<br>
&lt;fantasai> emilio: difference is whether observable by getComputedStyle()<br>
&lt;florian> s/Firefox will [missed other]/Firefox will do it at computed value time<br>
&lt;fantasai> emilio: same way we blockify<br>
&lt;florian> s/Blink will [missed]/Blink will do it at used value time<br>
&lt;fantasai> fantasai: being consistent with blockification is better<br>
&lt;fantasai> iank_: I'd like to do a tiny bit of research into why we did it that way, so separate issue would be better<br>
&lt;fantasai> RESOLVED: -webkit-line-clamp with display: -webkit-box or -webkit-vertical-box establishes a BFC as described in the issue. Open new issue on timing of blockification (computed vs used)<br>
&lt;fantasai> florian: follow-up question<br>
&lt;emilio> https://searchfox.org/mozilla-central/rev/4582d908c17fbf7924f5699609fe4a12c28ddc4a/servo/components/style/style_adjuster.rs#154-183 is the code fwiw<br>
&lt;fantasai> florian: This blockficiation we just decided to do, do we only do it if you line-clamp through -webkit-line-clamp or only or for both?<br>
&lt;emeyer> fantasai: If someone set line-clamp on display: flex<br>
&lt;fantasai> iank_: no, only -webkit-box<br>
&lt;fantasai> iank_: I think that's fine<br>
&lt;emilio> +1<br>
&lt;fantasai> fantasai: ah ok<br>
&lt;iank_> `display: -webkit-box; -webkit-box-orient: vertical; line-clamp: 2`<br>
&lt;iank_> does above clamp or not<br>
&lt;fantasai> florian: ok, then let's have a supplementary resolution<br>
&lt;fantasai> RESOLVED: The previous resolution also applies to unprefixed line-clamp<br>
&lt;dbaron> ACTION Ian to open the above issue<br>
</details>


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


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

Received on Wednesday, 12 June 2024 14:05:29 UTC