Physikerwelt has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/331661 )
Change subject: Add scrollbars to displaystyle formulae
......................................................................
Add scrollbars to displaystyle formulae
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
---
M MathMathML.php
M modules/ext.math.css
2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math
refs/changes/61/331661/1
diff --git a/MathMathML.php b/MathMathML.php
index 40bc77c..d29210a 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -446,7 +446,7 @@
} 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 @@
img.tex {
vertical-align: middle;
}
+
+.mwe-math-element {
+ overflow-x: auto;
+ max-width: 100%;
+}
--
To view, visit https://gerrit.wikimedia.org/r/331661
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba462601bb15f8667d1284282ba4f6c2020a02b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits