2014-03-17 06:14:02 +00:00
|
|
|
/*
|
2015-09-28 22:29:07 +00:00
|
|
|
* Document : ext.math
|
|
|
|
* Created on : 23.09.2013, 13:55:00
|
|
|
|
* Author : Physikerwelt (Moritz Schubotz)
|
|
|
|
* Description: Shows browser-dependent math output.
|
|
|
|
*/
|
2016-05-19 17:06:34 +00:00
|
|
|
@namespace m url( http://www.w3.org/1998/Math/MathML );
|
2014-03-17 06:14:02 +00:00
|
|
|
|
2014-06-18 14:53:50 +00:00
|
|
|
/* Default style for MathML. */
|
2016-05-19 17:06:34 +00:00
|
|
|
.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;
|
|
|
|
}
|
|
|
|
|
2014-10-10 10:38:23 +00:00
|
|
|
.mwe-math-mathml-a11y {
|
2015-09-28 22:29:07 +00:00
|
|
|
/* We try to hide the MathML formula in a way that still makes it accessible to accessibility tools. */
|
2016-05-19 17:06:34 +00:00
|
|
|
clip: rect( 1px, 1px, 1px, 1px );
|
2015-09-28 22:29:07 +00:00
|
|
|
overflow: hidden;
|
|
|
|
position: absolute;
|
|
|
|
width: 1px;
|
|
|
|
height: 1px;
|
|
|
|
opacity: 0;
|
2014-10-04 18:48:42 +00:00
|
|
|
}
|
2016-05-19 17:06:34 +00:00
|
|
|
|
2014-10-12 09:26:57 +00:00
|
|
|
/* Default style for the image fallback. */
|
|
|
|
/* Note: We had to use !important rules because of conflicts with the style
|
2015-09-28 22:29:07 +00:00
|
|
|
generated by Mathoid. See https://gerrit.wikimedia.org/r/#/c/166213/ */
|
2016-05-19 17:06:34 +00:00
|
|
|
.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 */
|
|
|
|
}
|
2014-06-18 14:53:50 +00:00
|
|
|
|
|
|
|
/* Default style for the source fallback. */
|
2016-05-19 17:06:34 +00:00
|
|
|
.mwe-math-fallback-source-inline {
|
|
|
|
display: inline;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mwe-math-fallback-source-display {
|
|
|
|
display: block;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
}
|
2014-06-18 14:53:50 +00:00
|
|
|
|
2023-10-29 14:00:34 +00:00
|
|
|
/* the source rendering mode generates the class tex for backwards compatibility T348938 */
|
2015-10-31 09:40:31 +00:00
|
|
|
img.tex {
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
2017-01-11 18:43:10 +00:00
|
|
|
|
2017-06-08 16:26:32 +00:00
|
|
|
div.mwe-math-element {
|
2017-01-11 18:43:10 +00:00
|
|
|
overflow-x: auto;
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
2024-10-21 15:15:39 +00:00
|
|
|
|
|
|
|
/* Polyfill for MathML matrix elements with menclose https://github.com/w3c/mathml-core/issues/245 */
|
|
|
|
mtd.mwe-math-matrix-top {
|
|
|
|
border-top: 0.06em solid;
|
|
|
|
}
|
|
|
|
|
|
|
|
mtd.mwe-math-matrix-bottom {
|
|
|
|
border-bottom: 0.06em solid;
|
|
|
|
}
|
|
|
|
|
|
|
|
mtd.mwe-math-matrix-left {
|
|
|
|
border-left: 0.06em solid;
|
|
|
|
}
|
|
|
|
|
|
|
|
mtd.mwe-math-matrix-right {
|
|
|
|
border-right: 0.06em solid;
|
|
|
|
}
|
2024-11-03 07:58:50 +00:00
|
|
|
|
|
|
|
/* see https://github.com/w3c/mathml-core/issues/245#issuecomment-2410676518 */
|
|
|
|
menclose.menclose {
|
|
|
|
position: relative;
|
|
|
|
padding: 0.5ex 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
mrow.menclose-updiagonalstrike {
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
left: 0.5px;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background-color: currentcolor;
|
|
|
|
clip-path: polygon( 0.05em 100%, 0 calc( 100% - 0.05em ), calc( 100% - 0.05em ) 0, 100% 0.05em );
|
|
|
|
}
|
|
|
|
|
|
|
|
mrow.menclose-downdiagonalstrike {
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
left: 0.5px;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background-color: currentcolor;
|
|
|
|
clip-path: polygon( 0 0, 0.05em 0, 100% 100%, calc( 100% - 0.05em ) 100% );
|
|
|
|
}
|