Fix supsub inside something with text-align: center
Apparently text-align is inherited, so it was causing the smaller of the
two (the sup and sub) to be centered, when it should be left-aligned.
See GitHub comment on this commit for illustration.
diff --git a/src/css/math.less b/src/css/math.less
index 5fa0acc..49a4214 100644
--- a/src/css/math.less
+++ b/src/css/math.less
@@ -129,6 +129,7 @@
// its contents, rather than always being as wide as the subscript.
// See also .fraction
.mq-supsub {
+ text-align: left;
font-size: 90%;
vertical-align: -.5em;
&.mq-limit {
diff --git a/test/visual.html b/test/visual.html
index 6028a1a..cda3f14 100644
--- a/test/visual.html
+++ b/test/visual.html
@@ -77,7 +77,7 @@
<td><span class="mathquill-static-math">\sqrt{\MathQuillMathField{x^2+y^2}}</span>
</table>
-<p>Clicks/mousedown to drag should work anywhere in the blue box: <div class="math-container" style="border: solid 1px lightblue; height: 5em; width: 15em; line-height: 5em; text-align: center"><span class="mathquill-math-field">a_2 x^2 + a_1 x + a_0 = 0</span></div>
+<p>Clicks/mousedown to drag should work anywhere in the blue box: <div class="math-container" style="border: solid 1px lightblue; height: 5em; width: 15em; line-height: 5em; text-align: center"><span class="mathquill-math-field">x_{very\ long\ thing}^2 + a_0 = 0</span></div>
<h3>Redrawing</h3>
<p>