Skip to content

Define what inline percentages resolve against. #76

Open

Description

@bfgeek

See:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=6702

Safari appears to resolve against zero.
Firefox appears to resolve against its (parents?) width?

This needs to be defined, and tests with various combinations of elements, and various writing modes (depending what is decided).

Activity

  1. fred-wang commented on Jul 29, 2019

    @fred-wang
    Contributor

    Consensus during mathml core meeting: Ignore width/height on all new layout as they are no clear use case and that simplifies implementation. It still makes sense for mtable or math elements.

  2. bfgeek commented on Jul 29, 2019

    @bfgeek
    Author

    You still need to define this for nested elements which do abide by width/height. (See test-case).

  3. NSoiffer commented on Jul 31, 2019

    @NSoiffer
    Contributor

    Update: although my answer below touches on this issue, I think it is more relevant for w3c/mathml#50 since token elements are mostly (currently) defined as block level elements in the spec.

    For leaf content, it seems that the answer lies in whether we decide leaves are inline or inline-block. If inline, then this question is trivially resolved (it's 0). Currently the core spec says that mtext (and hence many leaf elements) for layout are block box. Assuming this stays, then it seems like the width needs to be relative to a parent context that can set the width: either math or mtable. In the latter case, if it lies in a column of fixed with, then that's the context.

    The issue of whether elements are block or inline has come up a number of times. My memory is that in most (all?) cases, having most elements be inline simplifies interactions with CSS. Although @fred-wang is probably not happy with opening up something he probably feels has to be the way the spec says it is, we probably should have an issue to at least get the rationale down so everyone can understand it and agree upon it.

  4. fred-wang commented on Sep 9, 2019

    @fred-wang
    Contributor

    You still need to define this for nested elements which do abide by width/height. (See test-case).

    Proposal: resolve percent against 0 in this case.

  5. rwlbuis commented on Sep 12, 2019

    @rwlbuis
    Contributor

    I am not sure that the original example is valid, according to the spec div is not allowed in span.
    I did my experiments with:
    https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=7193

  6. fred-wang commented on Sep 15, 2019

    @fred-wang
    Contributor

    Consensus from 2019/09/12 is essentially: use the size provided by a block container without display: math

  7. transferred this issue fromw3c/mathmlon Jun 30, 2021
  8. added a commit that references this issue on Sep 30, 2024
  9. added a commit that references this issue on Oct 3, 2024
  10. 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

      Sponsor
      SponsoredKunjungi sekarang
      Promo