-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Use EmbedLiveSample for all MathML examples #20506
Conversation
cc @Elchi3 |
Looks good to me. I'm unsure about loading the CSS with the fonts. Is that something that you guarantee to work going forward? |
@Elchi3 OK, this was also done in #19467 FWIW. If we don't use those web fonts, some math content may not render well in browsers, which may make some examples confusing. Alternatively, we can remove that and add a warning box, pointing to https://developer.mozilla.org/en-US/docs/Web/MathML/Fonts. |
Done: - Add live sample to show the result in the browser, replacing "rendering in your browser" for some examples. - Remove "sample rendering" for some examples, the only exception being `<mfenced>` which is not intended to be supported by browsers in the future, so it's still useful show how it was supposed to render. - Use display="block" for MathML examples, so they show up more "beautifully" (centered in their own line with optimization on readability). - Add a hidden link to math web font for some of them, to ensure that stretchy characters can display correctly. - Adjust indentation and spacing. - Other minimal tweaks of the examples (adding background to spacing elements, add click instruction to maction, split token element examples into multiple lines, fix one quote in ms example, ...) Rationale: - Makes examples a bit clearer and consistent. - All browsers are going to have MathML in the short future (or can already be enabled by a flag), using EmbedLiveSample is more convenient for maintenance of the wiki pages.
975dac6
to
fd10f5c
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.
I think the font loading is great. I just wasn't sure about how to load it (whether it is okay to load from an external [your] GitHub repo). However, as this has been approved before, I won't block it :)
Done: - Add live sample to show the result in the browser, replacing "rendering in your browser" for some examples. - Remove "sample rendering" for some examples, the only exception being `<mfenced>` which is not intended to be supported by browsers in the future, so it's still useful show how it was supposed to render. - Use display="block" for MathML examples, so they show up more "beautifully" (centered in their own line with optimization on readability). - Add a hidden link to math web font for some of them, to ensure that stretchy characters can display correctly. - Adjust indentation and spacing. - Other minimal tweaks of the examples (adding background to spacing elements, add click instruction to maction, split token element examples into multiple lines, fix one quote in ms example, ...) Rationale: - Makes examples a bit clearer and consistent. - All browsers are going to have MathML in the short future (or can already be enabled by a flag), using EmbedLiveSample is more convenient for maintenance of the wiki pages.
Description
<mfenced>
which is not intended to be supported by browsers in the future, so it's still useful show how it was supposed to render.Motivation
Additional details
N/A
Related issues and pull requests
N/A