-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Reorganize documentation for MathML global attributes #17812
Conversation
Hi! I have a generic question: what is the implementation status of MathML-Core? |
short answer: implemented in Chromium under a flag, and some alignment has been done on the Gecko/WebKit side. |
Do we have MathML page types? cc: @wbamberg? |
@estelle Thanks for the review. I believe I've addressed all the feedback. I'm not sure I know what page types are, but ideally I'd like to have a sidebar similar to https://developer.mozilla.org/en-US/docs/Web/HTML where elements and global attributes are accessible from the sidebar. Probably out of the scope for this commit. For now, I added a link to global attributes from the MathML attributes page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few more spots could use values and examples. I have a few questions too which I had reading this, so think addressing those may help the newbie (like me.)
Thanks!
{{MathMLRef("Global_attributes")}} | ||
|
||
The **`mathcolor`** [global attribute](/en-US/docs/Web/MathML/Global_attributes) sets the [color](/en-US/docs/Web/CSS/color) of a MathML element. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> **Note:** Use CSS for styling MathML whenever possible. The `mathcolor` attribute should only be included for applications that are not CSS-aware and will be overridden by the CSS `color` property , if set. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does mathcolor
impact border-color like CSS color
does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes mathcolor
sets the color
property via a presentational hint so all the feature of color
apply too. Do you mean we should be more explicit about it? I only explicitly mentioned "fraction bars or radical symbols" below as they are specific to math.
Page types are just a piece of metadata, represented as a |
Yes, I would have:
And the two common to every area:
|
@estelle Thanks. I believe this is ready for another round of review! |
d581728
to
41a5810
Compare
41a5810
to
83e64f0
Compare
- Add a new article for the [math-depth](https://w3c.github.io/mathml-core/#the-math-script-level-property) property, which is used to implement the global attribute `scriptlevel` in MathML Core. Also mention font-size: math. - Remove all per-element references to [global attributes](https://w3c.github.io/mathml-core/#global-attributes) from MathML element pages as well as the Gecko-specific notes for `mathvariant`. Instead, they are moved to dedicated pages about global attributes. - Introduce a new `mathml/global_attributes/` directory, based on HTML's one. For now, most of the links for these attributes point to equivalent pages for HTML. New articles are created for MathML-specific global attributes. Note that the specifications and browser compatibility data for these new articles are currently missing.
83e64f0
to
b4b762d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, @fred-wang . I had a few comments/changes, but this is very close to being ready to merge.
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Co-authored-by: Jean-Yves Perrier <[email protected]>
Let's merge this! |
This is adding data for new pages added in mdn/content#17812
* Add data for MathML global attributes This is adding data for new pages added in mdn/content#17812 * improve version_added for firefox & webkit * update safari version_added ; add dir attribute
This is a follow-up of [1]: - Comments that displaystyle/scriptlevel/mathvariant are implemented via CSS are moved to browser-compat-data [2]. - mathsize: empty section is removed. - mathvariant: recommendation to use Unicode characters is removed, since it's repeating a note above on the page. The vague statement about partial implementation in Firefox 28 as well as the comment to have appropriate fonts are removed, as they are not really important. [1] mdn#17812 [2] mdn/browser-compat-data#17067
This is a follow-up of [1]: - Comments that displaystyle/scriptlevel/mathvariant are implemented via CSS are moved to browser-compat-data [2]. - mathsize: empty section is removed. - mathvariant: recommendation to use Unicode characters is removed, since it's repeating a note above on the page. The vague statement about partial implementation in Firefox 28 as well as the comment to have appropriate fonts are removed, as they are not really important. [1] #17812 [2] mdn/browser-compat-data#17067
math-depth
property, which is used to implement the global attribute
scriptlevel
in MathML Core.
global attributes
from MathML element pages as well as the Gecko-specific notes for
mathvariant
. Instead, they are moved to dedicated pages about globalattributes.
mathml/global_attributes/
directory, based onHTML's one. For now, most of the links for these attributes point to
equivalent pages for HTML. New articles are created for MathML-specific
global attributes.
Note that the specifications and browser compatibility data for these new
articles are currently missing.
Summary
Reorganize documentation for MathML global attributes, moving them to dedicated pages instead of duplicating on each MathML element article. This also introduces CSS
math-depth
article for the sake of documentingscriptlevel
.Motivation
In the past, some attributes could be applied to a large class of MathML elements but not necessarily to all of them. This has changed with MathML Core where these generic attributes are now clearly defined as global attributes. Additionally, many attributes have now been taken from HTML (such as
nonce
oron*
ordata-*
) and need to be documented.Supporting details
https://w3c.github.io/mathml-core/#global-attributes
Related issues
Metadata