Skip to content

[css-inline] Is text-box-edge inherited or not? #10904

Closed

Description

@kojiishi

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?

@fantasai @nt1m @vitorroriz @Clqsin45 @bfgeek @chrishtr @jfkthame @kidayasuo

Activity

  1. fantasai commented on Oct 8, 2024

    @fantasai
    Collaborator

    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.

  2. fantasai commented on Oct 15, 2024

    @fantasai
    Collaborator

    Chatted with @jensimmons yesterday; her intuition is the same as yours, @kojiishi, that text-box-edge should be inherited.

  3. css-meeting-bot commented on Oct 16, 2024

    @css-meeting-bot
    Member

    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
  4. fantasai commented on Oct 16, 2024

    @fantasai
    Collaborator

    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.

  5. added a commit that references this issue on Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions