Skip to content

mpadded and percentages #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fred-wang opened this issue Dec 20, 2022 · 3 comments
Open

mpadded and percentages #183

fred-wang opened this issue Dec 20, 2022 · 3 comments

Comments

@fred-wang
Copy link
Contributor

I'm extracting this from #75

In MathML 3, percentages are relative to the size of the mpadded element.
For example with

<mpadded width="50%">
  <mspace width="100px"/>
</mpadded>

the mpadded would have width=50px. As stated on #75, this behavior is different from CSS and makes implementation more complicate. So percentage values are just ignored in Chrome 109 implementation.

Currently, https://w3c.github.io/mathml-core/#adjust-space-around-content-mpadded does not seem to say how percentage values are handled.

@brucemiller
Copy link

The sub-issue I raised in #75 was about the +/- form of dimensions rather than percentages; However, a working % as you describe would provide a much more robust solution to the problem I mentioned.

@fred-wang
Copy link
Contributor Author

The text is actually:

If the width (respectively height, depth, lspace, voffset) attribute is absent, invalid or a <length-percentage> then the requested width (respectively height, depth, lspace, voffset) is the inner inline size (respectively inner line-ascent, inner line-descent, 0, 0).

which seems a mistake, otherwise all <length-percentage> values are rejected... I'm going to relax this, to only reject percentage, so it's minimum that browsers implement.

@bkardell
Copy link
Collaborator

This should be linked to #84, probably which changed the text @fred-wang quoted. The WG discussed this and thought this change in #84 was perhaps too subtle and easy to miss the word "not" on width.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants