Skip to content
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

Add compatibility data for legacy MathML lengths #17934

Merged
merged 1 commit into from Oct 4, 2022

Conversation

fred-wang
Copy link
Contributor

Summary

MDN contains a section about legacy MathML lengths [1] and refers to a browser compatibility table mathml.attribute_values that is currently missing. This commit adds relevant compatibility data for two kinds of accepted values mentioned in this section:

  • non-zero unitless length values (e.g. 5 to mean 500%),
  • named spaces (e.g. thinmathspace to mean 3/18em)

The edge case numbers ending with a dot (e.g. 34.px) is ignored, that seems a bug in MathML 3 that is not even mention in version 4 [2] and is not super important for web developers.

Corresponding data is added for length attributes, namely mfrac's linethickness, mo's lspace/rspace/maxsize/minsize, mspace's depth/height/width, mtable's width and the global mathsize attribute (note that non-zero unitless is not added for mspace, it's not relevant since the default dimensions are 0 anyway).

Test results and supporting details

These features have been implemented a long time in Gecko, before the first release of Firefox. Unitless values have been removed in Firefox 70 [3] and the there is plan to disable the pref for named spaces [4]. The two features have also been implemented in Safari 10 [5] and there is no plan to implement them in Chromium since they are not part of MathML Core.

[1] https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute/Values#legacy_mathml_lengths
[2] https://w3c.github.io/mathml/#fund_units
|3] https://bugzilla.mozilla.org/show_bug.cgi?id=1574749#c8
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1793549
[5] https://commits.webkit.org/136199@main

Related issues

N/A

MDN contains a section about legacy MathML lengths [1] and refers to
a browser compatibility table `mathml.attribute_values` that is
currently missing. This commit adds relevant compatibility data for
two kinds of accepted values mentioned in this section:

- non-zero unitless length values (e.g. `5` to mean 500%),
- named spaces (e.g. `thinmathspace` to mean 3/18em)

The edge case numbers ending with a dot (e.g. `34.px`) is ignored, that
seems a bug in MathML 3 that is not even mention in version 4 [2] and
is not super important for web developers.

Corresponding data is added for length attributes, namely mfrac's
linethickness, mo's lspace/rspace/maxsize/minsize,
mspace's depth/height/width, mtable's width and the global mathsize
attribute (note that non-zero unitless is not added for mspace, it's
not relevant since the default dimensions are 0 anyway).

These features have been implemented a long time in Gecko, before the
first release of Firefox. Unitless values have been removed in Firefox
70 [3] and the there is plan to disable the pref for named spaces [4].
The two features have also been implemented in Safari 10 [5] and there
is no plan to implement them in Chromium since they are not part of
MathML Core.

[1] https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute/Values#legacy_mathml_lengths
[2] https://w3c.github.io/mathml/#fund_units
|3] https://bugzilla.mozilla.org/show_bug.cgi?id=1574749#c8
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1793549
[5] https://commits.webkit.org/136199@main
@fred-wang
Copy link
Contributor Author

cc @Elchi3

@github-actions github-actions bot added the data:mathml ➗ Compat data for MathML features. https://developer.mozilla.org/docs/Web/MathML label Oct 4, 2022
fred-wang added a commit to fred-wang/content that referenced this pull request Oct 4, 2022
Makes clear that accepted values are `<length-percentage>` but add notes about legacy MathML lengths.
Compatibility tables are updated in mdn/browser-compat-data#17934
Elchi3 added a commit to mdn/content that referenced this pull request Oct 4, 2022
* Small tweak for mathsize and mtable@width

Makes clear that accepted values are `<length-percentage>` but add notes about legacy MathML lengths.
Compatibility tables are updated in mdn/browser-compat-data#17934

* fix links

* Update files/en-us/web/mathml/attribute/index.md

Co-authored-by: Florian Scholz <fs@florianscholz.com>
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (usually we don't add very long descriptions [I think the property should have been called "label"], but let's see how it renders and if there are problems we can shorten it).

@Elchi3 Elchi3 merged commit 0bc324c into mdn:main Oct 4, 2022
@fred-wang fred-wang deleted the legacy-lengths branch October 4, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:mathml ➗ Compat data for MathML features. https://developer.mozilla.org/docs/Web/MathML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants