Skip to content

Interaction between height and baseline alignment #259

Open

Description

@fred-wang

Follow-up of #75

I've worked on the Firefox implementation of width/height, tried to follow what MathML Core / Chromium do and I'm adding missing test coverage.

I just uploaded a testcase for various situations: https://bug1916988.bmoattachments.org/attachment.cgi?id=9425482

One behavior I'm not sure is what happens when we specify a CSS height that is smaller than the line-ascent. It seems Chrome sets the corresponding height and does not clamp the line-ascent, so baseline alignment with other siblings stay the same. I think that makes sense to me and that's what I'm implementing in Firefox, but we might need some extra text is the spec to clarify.

Related to that, when we specify a height for the "content box" that is different from the one of the "math content box", then MathML Core (and Chromium, in what I'm implementing in Firefox and in WPT tests I'm adding) says to align the top edges of these boxes. But maybe what is more natural is to tweak the line-ascent/line-descent evenly so that the baseline is unchanged.

Activity

  1. added a commit that references this issue on Sep 30, 2024
  2. added a commit that references this issue on Oct 3, 2024
  3. fred-wang commented on Oct 14, 2024

    @fred-wang
    ContributorAuthor

    FWIW, I'm implementing Chromium's behavior in WebKit too.

  4. davidcarlisle commented on Oct 28, 2024

    @davidcarlisle
    Collaborator

    @fred-wang

    But maybe what is more natural is to tweak the line-ascent/line-descent evenly so that the baseline is unchanged.

    The WG discussed this on the call 2024-10-28 and we think this baseline alignment does sound more natural.

  5. bkardell commented on Aug 22, 2025

    @bkardell
    Collaborator

    Does this require spec changes?

  6. fred-wang commented on Aug 23, 2025

    @fred-wang
    ContributorAuthor

    I think we would need to check the status in Firefox and whether it remains FIXME in the code, but likely not urgent to change anything in the spec for now.

  7. bkardell commented on Aug 25, 2025

    @bkardell
    Collaborator

    It's urgent in the sense that we are trying to move it toward REC :)

  8. NSoiffer commented on Aug 25, 2025

    @NSoiffer
    Contributor

    We discussed this today.

    It also appears that we need to say something about this in the spec. Probably where line-ascent is defined.

  9. added a commit that references this issue on Sep 16, 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