From 37acf481c4f8ac8e81957e8cc17ef64a6105d15c Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 26 May 2018 07:17:04 -0700 Subject: [PATCH] Use explicit vertical-align rather than mjx-symmetric with CSS that only works on Mac OS --- mathjax3-ts/output/chtml/Wrappers/mo.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mathjax3-ts/output/chtml/Wrappers/mo.ts b/mathjax3-ts/output/chtml/Wrappers/mo.ts index 033a4e40f..b09bcdfcc 100644 --- a/mathjax3-ts/output/chtml/Wrappers/mo.ts +++ b/mathjax3-ts/output/chtml/Wrappers/mo.ts @@ -50,13 +50,6 @@ export class CHTMLmo extends CHTMLWrapper { public static kind = MmlMo.prototype.kind; public static styles: StyleList = { - 'mjx-symmetric': { - 'vertical-align': '.25em' - }, - 'mjx-symmetric > mjx-c': { - 'vertical-align': 'middle' - }, - 'mjx-stretchy-h': { display: 'inline-table', width: '100%' @@ -160,7 +153,12 @@ export class CHTMLmo extends CHTMLWrapper { this.stretchHTML(chtml, symmetric); } else { if (symmetric || attributes.get('largeop')) { - chtml = this.adaptor.append(chtml, this.html('mjx-symmetric')) as N; + const bbox = BBox.empty(); + super.computeBBox(bbox); + const u = this.em((bbox.d - bbox.h) / 2 + this.font.params.axis_height); + if (u !== '0') { + this.adaptor.setStyle(chtml, 'verticalAlign', u); + } } for (const child of this.childNodes) { child.toCHTML(chtml);