Move vertical-align back to ext.math.css
This improves If8ee1cf6453257a0a2f6aa186d4007954a8e5d8e Change-Id: I794b39a5d322a92d9f722ded790e213803448127
This commit is contained in:
parent
7914fbea61
commit
3d0b787cbe
|
@ -141,9 +141,6 @@ class MathTexvc extends MathRenderer {
|
||||||
if ( $this->getMathStyle() === MW_MATHSTYLE_DISPLAY ){
|
if ( $this->getMathStyle() === MW_MATHSTYLE_DISPLAY ){
|
||||||
// if DisplayStyle is true, the equation will be centered in a new line
|
// if DisplayStyle is true, the equation will be centered in a new line
|
||||||
$attributes[ 'class' ] = 'mwe-math-fallback-image-display tex';
|
$attributes[ 'class' ] = 'mwe-math-fallback-image-display tex';
|
||||||
} else {
|
|
||||||
// Otherwise, do the vertical alignment.
|
|
||||||
$attributes[ 'style' ] = 'vertical-align: middle;';
|
|
||||||
}
|
}
|
||||||
return Xml::element( 'img',
|
return Xml::element( 'img',
|
||||||
$this->getAttributes(
|
$this->getAttributes(
|
||||||
|
|
|
@ -36,7 +36,7 @@ m|math {
|
||||||
/* Default style for the image fallback. */
|
/* Default style for the image fallback. */
|
||||||
/* Note: We had to use !important rules because of conflicts with the style
|
/* Note: We had to use !important rules because of conflicts with the style
|
||||||
generated by Mathoid. See https://gerrit.wikimedia.org/r/#/c/166213/ */
|
generated by Mathoid. See https://gerrit.wikimedia.org/r/#/c/166213/ */
|
||||||
.mwe-math-fallback-image-inline { display: inline; }
|
.mwe-math-fallback-image-inline { display: inline; vertical-align: middle; }
|
||||||
.mwe-math-fallback-image-display { display: block; margin-left: auto !important; margin-right: auto !important; }
|
.mwe-math-fallback-image-display { display: block; margin-left: auto !important; margin-right: auto !important; }
|
||||||
|
|
||||||
/* Default style for the source fallback. */
|
/* Default style for the source fallback. */
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
img = document.createElement('img');
|
img = document.createElement('img');
|
||||||
img.setAttribute( 'src', this.src.replace('mode=' + MW_MATH_MATHML, 'mode=' + MW_MATH_PNG) );
|
img.setAttribute( 'src', this.src.replace('mode=' + MW_MATH_MATHML, 'mode=' + MW_MATH_PNG) );
|
||||||
img.setAttribute( 'class', 'tex mwe-math-fallback-image-' + ($( this ).hasClass('mwe-math-fallback-image-inline') ? 'inline' : 'display') );
|
img.setAttribute( 'class', 'tex mwe-math-fallback-image-' + ($( this ).hasClass('mwe-math-fallback-image-inline') ? 'inline' : 'display') );
|
||||||
img.setAttribute( 'style', 'vertical-align: center;' );
|
|
||||||
img.setAttribute( 'aria-hidden', 'true' );
|
img.setAttribute( 'aria-hidden', 'true' );
|
||||||
this.parentNode.insertBefore( img, this );
|
this.parentNode.insertBefore( img, this );
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue