Open asavoy opened 8 years ago
Basically this can't be fixed given the way that MathQuill renders right now (using "inline-block" rendering) - because browsers are allowed to wrap right after any inline-block element (i.e. right after a MathQuill block, or between the base and exponent)
We don't have great options to fix:
is the problem you're trying to solve that the superscript (^2) is wrapping, or the math field?
If you leave the math field container as an inline-block
but make the exponent inline, the math field box will still increase the height of the line when needed for tall expressions, but the exponent might not wrap (maybe? It might still). (Also possibly worth trying but I doubt it'd work: U+2060 zero-width non-breaking space aka word joiner, which "prohibits a line break at its position": https://en.wikipedia.org/wiki/Word_joiner . Slightly more likely to work is a zero-width space at other places to encourage a line break there)
If you're trying to solve the whole math field box wrapping, the only idea I can think of is using JS to set its max-width
to be less than the space between that = sign and the right edge of the page or container.
And I assume you know about white-space: nowrap
.
With a long expression, when a term has a base and exponent, wrapping should not occur between the base and exponent, e.g.:
is preferred to the current behavior:
From https://trello.com/c/5JDVPiJu/8763-power-is-wrapping-in-mathquill