w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.47k stars 659 forks source link

[css-pseudo] Should the "first formatted line" propagate into a different BFC? #11038

Open kojiishi opened 5 days ago

kojiishi commented 5 days ago

Split the issue from https://github.com/w3c/csswg-drafts/issues/10990#issuecomment-2394760911 to discuss easier.

Blink I think currently has issues with ::first-line propagating into elements which establish independent formatting contexts, when arguably it shouldn't, when I last read the spec here somewhat questionable. E.g. https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=13169

@bfgeek @fantasai

fantasai commented 5 days ago

We need to review the implications for ::first-line, ::first-letter, and text-box-trim.

css-meeting-bot commented 4 days ago

The CSS Working Group just discussed [css-pseudo] Should the "first formatted line" propagate into a different BFC?.

The full IRC log of that discussion <matthieud> fantasai: text-box-trim feature really on concept of first formatted line
<matthieud> fantasai: also first-line and first-letter rely on this
<matthieud> fantasai: to what extend are the allowed to intrude into a new formatting context like ???
<matthieud> fantasai: we need to think about use cases
<matthieud> fantasai: possible easy answer : they dont (current implementation)
<florian> q+
<dholbert> s/???/flex, grid, multicol/
<matthieud> fantasai: in the past, people uses ??? to create a new formatting context
<Rossen16> ack dbaron
<emilio> q+
<matthieud> dbaron: some case makes sense, other are problematic
<matthieud> dbaron: the weirdest is when a new formatting context has multiple stuff at the top
<matthieud> dbaron: like multi column or grid
<matthieud> dbaron: whether that justify to make it work with all new formatting context is another question
<dbaron> s/work/not work/
<emilio> q- emilio
<dbaron> dbaron: But I think it's weird to apply it to the cases where there are multiple thingns at the top or bottom
<Rossen16> ack florian
<matthieud> florian: by not intruding into nested contexts, you mean that the first formated line wouldn't exist in such cases, or that it would be the first line after the nested formatting context?
<matthieud> fantasai: would not exist
<fantasai> dbaron, I think it might make sense to apply it to all of the things at the top
<dbaron> (This seems different from first-line and fisrt-letter in this regard.)
<fantasai> dbaron, but definitely not just one of them
Loirooriol commented 4 days ago
kojiishi commented 2 days ago

Here is the logic Blink excludes tables, flex, grid, <button>, and button input for ::first-letter.