Skip to content

A CSS stylesheet to provide some fallback rendering to browsers without MathML support

License

Notifications You must be signed in to change notification settings

fred-wang/mathml.css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mathml.css

This mathml.css stylesheet is a simplified version of the MathML for CSS Profile without CSS table rules that had only been implemented in Presto and using new CSS3 selectors and flexboxes. We know from Opera's experience that relying exclusively on a fixed set of CSS rules to do math layout is not reasonable. This stylesheet is only intended to provide some fallback to browsers without MathML support in order to make basic mathematical constructions readable, without claim of rendering quality. For heavier polyfill with better MathML support see mathjax.js. You might also consider the mathml-warning script, which displays a warning message and let the user choose one of the MathML polyfill.

This stylesheet must not be loaded in browsers that have MathML support or it will mess up the native rendering. You must instead load the mathml.css file conditionally via Javascript using some browser sniffing or feature detection The easiest way is to insert the mspace.js script in your document header:

<html>
  <head>
    ...
    <script src="https://fred-wang.github.io/mathml.css/mspace.js"></script>
    ...
  </head>
  ...
</html>

You can see a demo page that gives an overview of the basic constructions supported and show the limitations in more complex cases.

About

A CSS stylesheet to provide some fallback rendering to browsers without MathML support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published