Skip to content

[css-inline-3][css-text-3] Clarification on vertical-align shorthand and text boundary shaping #13277

Open

Description

@kbhomes

Hey, I'm working on Firefox's implementation of the vertical-align shorthand (https://bugzil.la/1830771) and associated alignment-baseline and baseline-shift properties. I had a question on the expected behavior of the shorthand.

The /css/css-text/boundary-shaping/boundary-shaping-002.html WPT is testing this line from css-text-3's "7.3. Shaping Across Element Boundaries":

Text shaping must be broken at inline box boundaries when [...] vertical-align is not baseline.

I think this WPT itself was probably already wrong, because it tests the shaping break using vertical-align: 0, which CSS2 explicitly says is the same as baseline. I can fix this test during my implementation.

My primary question is about how baseline-source fits into this. If the css-text-3 condition of vertical-align is not baseline is accurate, then that means any non-initial value for baseline-source, alignment-baseline, and baseline-shift would break shaping. The last two are clear — a different baseline or a non-zero shift should break shaping. But should a non-auto value of baseline-source do that too? I would think that if changing it to first or last would have an actual effect on text shaping, then that means it would have been broken anyway.

If baseline-source shouldn't impact shaping, then does the css-text-3 specification need to change this vertical-align condition to specifically 'alignment-baseline' is not 'baseline' and 'baseline-shift' is not '0'?

Activity

  1. emilio commented on Jan 2, 2026

    @emilio
    Collaborator
  2. moved this to Most recent Agenda+ F2F in CSSWG summer 2026 meeting agendaon Aug 1, 2026
  3. 5 remaining items

  4. fantasai commented on Aug 11, 2026

    @fantasai
    Collaborator

    Pushed up edits to this effect. Agenda+ Async to check that everyone is happy with this. CC @bfgeek

  5. kbhomes commented on Aug 11, 2026

    @kbhomes
    ContributorAuthor

    Ah, thanks for clarifying on baseline-source. I'm curious about how the "applies to" change for baseline-source is implemented in practice -- does that mean that a declaration like baseline-source: first for an inline box is invalid, or that the declaration is valid but has no effect (this is my understanding)? If the latter, then is 'vertical-align' is not its initial value still ambiguous, since the specified / computed value would be the non-initial value? Maybe there's something about "used values" here, I'm not sure.

  6. frivoal commented on Aug 13, 2026

    @frivoal
    Collaborator

    I'm curious about how the "applies to" change for baseline-source is implemented in practice -- does that mean that a declaration like baseline-source: first for an inline box is invalid, or that the declaration is valid but has no effect (this is my understanding)?

    Valid but no effect, at least as far as effects baseline-source is trying to have.

    If the latter, then is 'vertical-align' is not its initial value still ambiguous, since the specified / computed value would be the non-initial value? Maybe there's something about "used values" here, I'm not sure.

    It wouldn't be ambiguous. vertical-align is a shorthand property, so if any of its longhands (including baseline-source) are not at their initial value, then vertical-align isn't either. So in a way, baseline-source does have an effect on inlines, but only indirectly.

    Arguably, it'd mildly unfortunate to break shaping due to baseline-source when baseline-source itself has no effect, but then again, since it has no effect, it's unlikely to be used in this context, and so it shouldn't really matter either way.

    We probably could make an exception, but if it wouldn't make a difference in practice, why bother?

  7. kbhomes commented on Aug 13, 2026

    @kbhomes
    ContributorAuthor

    Oh, got it. So nothing actually changes in the behavior of text shaping, since the initial value was already baseline. But rather we're expecting that authors wouldn't set baseline-source on inline boxes, so it doesn't actually matter. (I misunderstood the combination of edits, I thought it was trying to prevent the unfortunate effect.)

  8. astearns commented on Aug 17, 2026

    @astearns
    Member

    The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.

    Proposed Resolution: Accept edits clarifying that that baseline-source doesn't apply to inline boxes

  9. astearns commented on Aug 24, 2026

    @astearns
    Member

    RESOLVED: Accept edits clarifying that that baseline-source doesn't apply to inline boxes

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions