diff --git a/MathMathML.php b/MathMathML.php index 40bc77c..d29210a 100644 --- a/MathMathML.php +++ b/MathMathML.php @@ -446,7 +446,7 @@ class MathMathML extends MathRenderer { } else { $element = 'span'; } - $attribs = []; + $attribs = [ 'class' => 'mwe-math-element' ]; if ( $this->getID() !== '' ) { $attribs['id'] = $this->getID(); } diff --git a/modules/ext.math.css b/modules/ext.math.css index 69ea129..7ee2f9b 100644 --- a/modules/ext.math.css +++ b/modules/ext.math.css @@ -57,3 +57,8 @@ generated by Mathoid. See https://gerrit.wikimedia.org/r/#/c/166213/ */ img.tex { vertical-align: middle; } + +.mwe-math-element { + overflow-x: auto; + max-width: 100%; +}