You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-inline] Is text-box-edge inherited or not? #10904
Recently, the text-box-edge property was changed to a non-inherited property in the spec and tests.
IIUC, the original motivation to split the feature into two properties (text-box-trim and text-box-edge) was to make the former non-inherited while the latter inherited, so that i18n authors can set the default edges to all descendants depending on their scripts, but now this doesn't seem possible.
If we don't need the use case and both properties are non-inherited, can we merge the two properties back to one property?
I re-read #10675 but I couldn't read this point very well. Can we discuss this point?
The reason I didn't make text-box-edge inherited was to allow it to be an override that doesn't affect the content inside. For example if you want to trim a sidebar's top and bottom to a particular edge, but not affect how things inside it trim themselves. The line-fit-edge property inherits, so it can set a good default.
But I'm not 100% sure about this interaction, so I agree it's good to discuss it.
The CSS Working Group just discussed [css-inline] Is `text-box-edge` inherited or not?, and agreed to the following:
RESOLVED: make property text-box-edge inherited
The full IRC log of that discussion
<matthieud> fantasai: this is about inheritance of text-box-edge
<matthieud> fantasai: we split the text-box-edge into 2 properties
<matthieud> fantasai: koji thinks both properties should inherited (currently one does not the other)
<matthieud> fantasai: various scenarios seem to indicate that inheritance makes more sense for jen
<matthieud> fantasai: the proposal is to make text-box-edge inherit
<matthieud> fantasai: when triming, we use the value of text-box-edge on the containing block of the line box affected
<kizu> q+
<matthieud> fantasai: if you set text-box-trim on an article and heading says trim to ???, then you will trim the top of the first line to ???, and the bottom of last line to ideographic
<fantasai> s/trim to ???/trim to ex/
<matthieud> kizu: I have some concerns
<fantasai> s/line to ???/line to ex/
<matthieud> kizu: being inherited makes it very powerful
<matthieud> kizu: it could break some content inside (cf STP)
<matthieud> kizu: we will need to provide at least some author guidance to set it on the smallest element possible, otherwise component inside will be trimmed
<Rossen16> ack kizu
<matthieud> fantasai: no text-box-trim will NOT be inherited, only text-box-edge
<matthieud> fantasai: this change would allow : the box closest to the line box would have the priority about what edge to trim to
<matthieud> fantasai: if you have text with mixed writing mode, this change allow the closest box to the text to decide the edge which is appropriate
<matthieud> kizu: makes sense
<florian> q+
<matthieud> kizu: I dont see any issue if text-box-trim stays non inherited
<Rossen16> ack florian
<matthieud> florian: makes sense to me
<matthieud> florian: particularly about block boxes
<matthieud> florian: because text-box-trim also applies to inline, how it works there ?
<matthieud> fantasai: text-box-edge previously also changes the way line calculation is done, but it has been moved to line-box-edge
<matthieud> fantasai: text-box-edge has no effect on an inline of any other box, except if this box has text-box-trim also
<matthieud> florian: makes sense that it doesnt apply, but what happens when it applies ? the inline would use the value of text-box-edge itself, not the container ?
<matthieud> fantasai: yes
<matthieud> florian: I support the proposal
<matthieud> RESOLVED: make property text-box-edge inherited
For clarity, the proposal adopted was: Switch text-box-edge to be inherited. text-box-trim remains non-inherited. Trimming uses the text-box-edge of the line box's containing block; or if trimming an inline box, the text-box-edge of the box itself.
Activity
fantasai commentedon Oct 8, 2024
The reason I didn't make
text-box-edgeinherited was to allow it to be an override that doesn't affect the content inside. For example if you want to trim a sidebar's top and bottom to a particular edge, but not affect how things inside it trim themselves. Theline-fit-edgeproperty inherits, so it can set a good default.But I'm not 100% sure about this interaction, so I agree it's good to discuss it.
fantasai commentedon Oct 15, 2024
Chatted with @jensimmons yesterday; her intuition is the same as yours, @kojiishi, that
text-box-edgeshould be inherited.css-meeting-bot commentedon Oct 16, 2024
The CSS Working Group just discussed
[css-inline] Is `text-box-edge` inherited or not?, and agreed to the following:RESOLVED: make property text-box-edge inheritedThe full IRC log of that discussion
<matthieud> fantasai: this is about inheritance of text-box-edge<matthieud> fantasai: we split the text-box-edge into 2 properties
<matthieud> fantasai: koji thinks both properties should inherited (currently one does not the other)
<matthieud> fantasai: various scenarios seem to indicate that inheritance makes more sense for jen
<matthieud> fantasai: the proposal is to make text-box-edge inherit
<matthieud> fantasai: when triming, we use the value of text-box-edge on the containing block of the line box affected
<kizu> q+
<matthieud> fantasai: if you set text-box-trim on an article and heading says trim to ???, then you will trim the top of the first line to ???, and the bottom of last line to ideographic
<fantasai> s/trim to ???/trim to ex/
<matthieud> kizu: I have some concerns
<fantasai> s/line to ???/line to ex/
<matthieud> kizu: being inherited makes it very powerful
<matthieud> kizu: it could break some content inside (cf STP)
<matthieud> kizu: we will need to provide at least some author guidance to set it on the smallest element possible, otherwise component inside will be trimmed
<Rossen16> ack kizu
<matthieud> fantasai: no text-box-trim will NOT be inherited, only text-box-edge
<matthieud> fantasai: this change would allow : the box closest to the line box would have the priority about what edge to trim to
<matthieud> fantasai: if you have text with mixed writing mode, this change allow the closest box to the text to decide the edge which is appropriate
<matthieud> kizu: makes sense
<florian> q+
<matthieud> kizu: I dont see any issue if text-box-trim stays non inherited
<Rossen16> ack florian
<matthieud> florian: makes sense to me
<matthieud> florian: particularly about block boxes
<matthieud> florian: because text-box-trim also applies to inline, how it works there ?
<matthieud> fantasai: text-box-edge previously also changes the way line calculation is done, but it has been moved to line-box-edge
<matthieud> fantasai: text-box-edge has no effect on an inline of any other box, except if this box has text-box-trim also
<matthieud> florian: makes sense that it doesnt apply, but what happens when it applies ? the inline would use the value of text-box-edge itself, not the container ?
<matthieud> fantasai: yes
<matthieud> florian: I support the proposal
<matthieud> RESOLVED: make property text-box-edge inherited
fantasai commentedon Oct 16, 2024
For clarity, the proposal adopted was: Switch
text-box-edgeto be inherited.text-box-trimremains non-inherited. Trimming uses thetext-box-edgeof the line box's containing block; or if trimming an inline box, thetext-box-edgeof the box itself.[text-box] Make `text-box-edge` inherited per spec update
[text-box-trim] Retire text-box-edge propagation restriction
[text-box-trim] Retire text-box-edge propagation restriction
[text-box-trim] Retire text-box-edge propagation restriction
Bug 1933489 [wpt PR 49375] - [text-box-trim] Retire text-box-edge pro…
Bug 1933489 [wpt PR 49375] - [text-box-trim] Retire text-box-edge pro…
Bug 1933489 [wpt PR 49375] - [text-box-trim] Retire text-box-edge pro…
Bug 1933489 [wpt PR 49375] - [text-box-trim] Retire text-box-edge pro…
Cherry-pick 8b4bbd2. rdar://138343843