forked from wet-boew/wet-boew
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MathML polyfill: Update MathJax to ^3.2.0
Drastically reduces MathJax's burden on the build: * Brings a huge speed boost to Grunt's "copy:js" task (from ~13 to ~2 seconds) * Reduces MathJax's compiled size down from ~25 MB (1,347 files/809 folders) to ~1 MB (24 files/5 folders) * Almost halves the production dist folder's size (from ~55 MB to ~31 MB) Related changes: * Disable MathJax's context menu * Add an ES6 polyfill for IE11 support * Add extra line comments to give more context about how the polyfills are loaded in * Change the MathJax fallback test to look for a configuration option we're not customizing * Uses the CDN's latest version of MathJax 3 * Falls back on WET's local version of MathJax 3.2.0 if the CDN is unreachable * Tries loading a local version of MathJax 2 if all else fails * Add a temporary CSS workaround for mathjax/MathJax#2765 (thanks @dpvc!) * Remove the build system's string-replace:inline task (was only being used to insert a specific version number in the CDN's URL) * Update the documentation's known issues section: * Change it into an unordered list * Replace mentions of IE7-9 support with Chromium and IE11 * Remove mention of SVG support * Add an item about IE11 only being supported in internet-connected networks (due to its ES6 polyfill) * Remove items specific to IE7-8 Notes: * Disabling MathJax's context menu has the following impacts: * Works around MathJax 3.x's missing i18n support * Makes MathJax more closely mimic native MathML implementations (i.e. scraps bells and whistles that go beyond being a polyfill) * Removes some accessibility/usability enhancements that were present in WET's MathJax 2.x implementation (e.g. focusing on expressions, double-click to zoom). But it's not a huge loss since those enhancements don't exist in native MathML implementations. Visually-hidden MathML markup is still provided for ATs that support it. * Prevents users from accessing options that are excluded from WET's local copy of MathJax (e.g. "Math Settings - Math Renderer - SVG") * IE considerations: * Breaks compatibility with older versions of IE (older than IE11) * IE11 will only work if internet access is available * Somewhat alleviates wet-boew#8425 (could still be improved by removing MathJax from the "copy:js" task) * Fixes wet-boew#8769
- Loading branch information
1 parent
31904af
commit fc9258d
Showing
7 changed files
with
79 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW) | ||
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html | ||
*/ | ||
|
||
/* | ||
Extra CSS for MathJax 3.2.0: | ||
-Prevent msubsup element's superscripts from looking like subscripts | ||
-See https://github.com/mathjax/MathJax/issues/2765#issuecomment-920400049 | ||
-Only needed for 3.2.0, remove whenever WET updates to > 3.2.0 | ||
*/ | ||
|
||
mjx-script > * { | ||
display: inline-block !important; | ||
} | ||
|
||
mjx-script > mjx-spacer { | ||
display: block !important; | ||
} |