mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 17:30:40 +00:00
c877e564fc
Add mwe-math-element class attribute to the outermost element holding mathematical expressions. Add a css rule that adds a scrollbar to the element in case it's a div, which is the case for displaystyle formulae. Note, there will be no scroll bar if long formulae are not explicitly marked up das displaystyle formulae. Bug: T134281 Change-Id: Iba462601bb15f8667d1284282ba4f6c2020a02b9
65 lines
1.6 KiB
CSS
65 lines
1.6 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; /* stylelint-disable-line declaration-no-important */
|
|
}
|
|
|
|
.mwe-math-mathml-display {
|
|
display: block !important; /* stylelint-disable-line declaration-no-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;
|
|
}
|
|
|
|
/* 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; /* stylelint-disable-line declaration-no-important */
|
|
margin-right: auto !important; /* stylelint-disable-line declaration-no-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;
|
|
}
|
|
|
|
/* PNG related styles from core */
|
|
img.tex {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.mwe-math-element {
|
|
overflow-x: auto;
|
|
max-width: 100%;
|
|
}
|