mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-01 02:36:47 +00:00
6b30663057
Bug: T110492 Change-Id: I3775980916de12aef23bac85c38a6f92253aa479
65 lines
2.4 KiB
CSS
65 lines
2.4 KiB
CSS
/*
|
|
* Document : ext.math
|
|
* Created on : 23.09.2013, 13:55:00
|
|
* Author : Physikerwelt (Moritz Schubotz)
|
|
* Description: Shows browser-dependent math output.
|
|
*/
|
|
@namespace m url('http://www.w3.org/1998/Math/MathML');
|
|
|
|
/* Default style for MathML. */
|
|
.mwe-math-mathml-inline { display: inline !important; }
|
|
.mwe-math-mathml-display { display: block !important; margin-left: auto; margin-right: auto; }
|
|
.mwe-math-mathml-a11y {
|
|
/* We try to hide the MathML formula in a way that still makes it accessible to accessibility tools. */
|
|
clip: rect(1px, 1px, 1px, 1px);
|
|
overflow: hidden;
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
opacity: 0;
|
|
}
|
|
m|math {
|
|
/* Try some popular OpenType MATH fonts before the WOFF fallback */
|
|
/* We put Cambria before Cambria Math to workaround a bug on Windows
|
|
(see https://bugzilla.mozilla.org/show_bug.cgi?id=598900) */
|
|
font-family: Cambria, Cambria Math, Latin Modern Math, STIX Math, LatinModernMathWOFF, serif;
|
|
/* .mw-body-content sets the line-height to 1.6 which is not desired for math. For example */
|
|
/* matrices with brackets are rendered too large. See also https://phabricator.wikimedia.org/T106890 */
|
|
line-height: normal;
|
|
}
|
|
|
|
/* Default style for the image fallback. */
|
|
/* Note: We had to use !important rules because of conflicts with the style
|
|
generated by Mathoid. See https://gerrit.wikimedia.org/r/#/c/166213/ */
|
|
.mwe-math-fallback-image-inline { display: inline-block; vertical-align: middle; }
|
|
.mwe-math-fallback-image-display { display: block; margin-left: auto !important; margin-right: auto !important; }
|
|
|
|
/* Default style for the source fallback. */
|
|
.mwe-math-fallback-source-inline { display: inline; vertical-align: middle; }
|
|
.mwe-math-fallback-source-display { display: block; margin-left: auto; margin-right: auto; }
|
|
|
|
/**
|
|
* Browser-specific hacks are bad but let's use that for now...
|
|
* See http://browserhacks.com/
|
|
*/
|
|
@-moz-document url-prefix() {
|
|
/* For Gecko browsers, hide the SVG fallback and show the MathML instead.
|
|
* We override the style for SVG and MathML above
|
|
*/
|
|
.mwe-math-mathml-a11y {
|
|
clip: auto;
|
|
overflow: visible;
|
|
position: static;
|
|
width: auto;
|
|
height: auto;
|
|
opacity: 1;
|
|
}
|
|
.mwe-math-mathml-inline + .mwe-math-fallback-image-inline,
|
|
.mwe-math-mathml-display + .mwe-math-fallback-image-display { display: none !important; }
|
|
}
|
|
|
|
/* PNG related styles from core */
|
|
img.tex {
|
|
vertical-align: middle;
|
|
}
|