You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the spec follows MathML3 i.e. relative width/height/depth refer to the default size i.e. the size of its content.
In CSS, percentage refers to the size of the block container.
If we map MathML attributes to CSS this does not work.
So it looks like core level 1 should restrict more mpadded or things rewritten.
Discussed at the Core CG meeting today. Looking at usage stats, no one is reporting usage of %'s.
@rwlbuis reported Google only has an issue with 'width', but it seems weird to support depth/height and not width.
We didn't discuss lspace and voffset, but they would fall into "weird to support" group if width is not supported.
The meeting resolved that '%' should be removed completely from mpadded in core. They should remain in full and the polyfill should handle them (it already handles cross width - height/depth values)..
@rwlbuis We can't "remove %" since they are defined for CSS lengths. Instead, we need a way to interpret these values. I assume the suggestion is to handle them the same as what is done for "absent or invalid" in the spec so I'll do this. How did you implement this in chromium? Do you have WPT tests?
I think it is best to treat voffset/lspace attributes same as the width attribute regarding percentages. I updated the test for that: web-platform-tests/wpt#25175
Given the current plans for mpadded, how would an author recreate the effect of TeX \vcenter? We'll want to be able to change the first fraction below into the second one. How would an author do that?
I think you will have to use some Javascript to do this, which potentially is done by including the mpadded polyfill.
Your other alternative, which I don't recommend, is to use the polyfill, convert the position it comes up for your specific cases to a font relative unit such as 'ex's, and then use those in your code. I think it will get it close to right, but I doubt it will be exactly right in all situations. If you have lots of expression, that probably doesn't work for you.
@NSoiffer Thank you for the link to the polyfill. It contains some interesting techniques.
After a polyfill-mpadded has set the vertical alignment of the fraction, I believe a reflow would then be necessary to properly set the height and depth of the parentheses around the fraction shown above. (Correct me if that is wrong.) Of course, we all want to avoid a reflow.
It is very late to introduce a new attribute for the ongoing effort, but I hope that some kind \vcenter equivalent can be added to a future version of the MathML <mpadded> element. The syntax could be voffset='center' or symmetric='true'. Would it be appropriate to open a new issue for this request?
Unfortunately, without support for percentages, reflow is required.
I'm a little dubious that a voffset='center' attr will ever be added to core because all three browser vendors would need to support it, but at least it avoids (I think) google's objection to percentages. @fred-wang or @rwlbuis might know whether this would fly on technical grounds with google.
From a usage point of view, it seems hard to imagine it crosses the bar to get into core. Getting it into MathML 4 (and hence having a polyfill pre-built) is possibly more doable. I suggest you file a separate issue for that and provide use cases (from a TeX macro?) and maybe usage statistics if you can find them. Those could make a compelling case if there is significant usage.
Since support of % in mpadded attrs is no longer part of core, I removed the needs tests, etc labels. The spec seems up to date. The polyfill implments %s, so I am closing this issue.
Activity
NSoiffer commentedon Aug 10, 2020
Discussed at the Core CG meeting today. Looking at usage stats, no one is reporting usage of %'s.
@rwlbuis reported Google only has an issue with 'width', but it seems weird to support depth/height and not width.
We didn't discuss
lspaceandvoffset, but they would fall into "weird to support" group if width is not supported.The meeting resolved that '%' should be removed completely from mpadded in core. They should remain in full and the polyfill should handle them (it already handles cross width - height/depth values)..
fred-wang commentedon Aug 21, 2020
@rwlbuis We can't "remove %" since they are defined for CSS lengths. Instead, we need a way to interpret these values. I assume the suggestion is to handle them the same as what is done for "absent or invalid" in the spec so I'll do this. How did you implement this in chromium? Do you have WPT tests?
Treat percentage mpadded attributes as invalid/unspecified.
fred-wang commentedon Aug 21, 2020
I updated the spec to treat % as invalid/unspecified. This seems to match rob's tests.
@rwlbuis voffset/lspace attributes are not tested by web-platform-tests/wpt#24664 ; what's the decision here?
rwlbuis commentedon Aug 21, 2020
I think it is best to treat voffset/lspace attributes same as the width attribute regarding percentages. I updated the test for that:
web-platform-tests/wpt#25175
NSoiffer commentedon Aug 21, 2020
Removing all references to % in mpadded attrs for core is what the group decided. It is weird to allow them in only some cases.
The polyfill was updated to convert all %s to pixels.
ronkok commentedon Aug 29, 2020
Given the current plans for mpadded, how would an author recreate the effect of TeX
\vcenter? We'll want to be able to change the first fraction below into the second one. How would an author do that?NSoiffer commentedon Aug 31, 2020
I think you will have to use some Javascript to do this, which potentially is done by including the mpadded polyfill.
Your other alternative, which I don't recommend, is to use the polyfill, convert the position it comes up for your specific cases to a font relative unit such as 'ex's, and then use those in your code. I think it will get it close to right, but I doubt it will be exactly right in all situations. If you have lots of expression, that probably doesn't work for you.
ronkok commentedon Sep 1, 2020
@NSoiffer Thank you for the link to the polyfill. It contains some interesting techniques.
After a polyfill-mpadded has set the vertical alignment of the fraction, I believe a reflow would then be necessary to properly set the height and depth of the parentheses around the fraction shown above. (Correct me if that is wrong.) Of course, we all want to avoid a reflow.
It is very late to introduce a new attribute for the ongoing effort, but I hope that some kind
\vcenterequivalent can be added to a future version of the MathML<mpadded>element. The syntax could bevoffset='center'orsymmetric='true'. Would it be appropriate to open a new issue for this request?NSoiffer commentedon Sep 3, 2020
Unfortunately, without support for percentages, reflow is required.
I'm a little dubious that a
voffset='center'attr will ever be added to core because all three browser vendors would need to support it, but at least it avoids (I think) google's objection to percentages. @fred-wang or @rwlbuis might know whether this would fly on technical grounds with google.From a usage point of view, it seems hard to imagine it crosses the bar to get into core. Getting it into MathML 4 (and hence having a polyfill pre-built) is possibly more doable. I suggest you file a separate issue for that and provide use cases (from a TeX macro?) and maybe usage statistics if you can find them. Those could make a compelling case if there is significant usage.
NSoiffer commentedon Oct 5, 2020
Since support of % in mpadded attrs is no longer part of core, I removed the needs tests, etc labels. The spec seems up to date. The polyfill implments %s, so I am closing this issue.