Skip to content

Commit 8d85193

Browse files
committed
merge branch 'ie-stretchy-braces' into alpha
1 parent 0be8ee6 commit 8d85193

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

mathjax3-ts/output/chtml/Wrappers/mo.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,18 @@ export class CHTMLmo extends CHTMLWrapper {
8080
'mjx-stretchy-v': {
8181
display: 'inline-block'
8282
},
83+
'mjx-stretchy-v > *': {
84+
display: 'block'
85+
},
8386
'mjx-stretchy-v > mjx-beg': {
84-
display: 'block',
8587
height: 0
8688
},
87-
'mjx-stretchy-v > mjx-end': {
88-
display: 'block'
89-
},
9089
'mjx-stretchy-v > mjx-end > mjx-c': {
9190
display: 'block'
9291
},
93-
'mjx-stretchy-v > mjx-beg > mjx-c, mjx-stretchy-v > mjx-end > mjx-c': {
92+
'mjx-stretchy-v > * > mjx-c': {
93+
transform: 'scale(1)', // improves Firefox positioning
94+
'transform-origin': 'left center',
9495
overflow: 'hidden'
9596
},
9697
'mjx-stretchy-v > mjx-ext': {
@@ -101,7 +102,8 @@ export class CHTMLmo extends CHTMLWrapper {
101102
overflow: 'hidden'
102103
},
103104
'mjx-stretchy-v > mjx-ext > mjx-c': {
104-
transform: 'scaleY(500) translateY(.1em)'
105+
transform: 'scaleY(500) translateY(.1em)',
106+
overflow: 'visible'
105107
},
106108
'mjx-mark': {
107109
display: 'inline-block',

mathjax3-ts/output/chtml/fonts/tex.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,9 @@ export class TeXFont extends FontData {
454454
const Hb = this.addDelimiterVPart(styles, c, 'beg', beg);
455455
this.addDelimiterVPart(styles, c, 'ext', ext);
456456
const He = this.addDelimiterVPart(styles, c, 'end', end);
457+
let Hm;
457458
if (mid) {
458-
this.addDelimiterVPart(styles, c, 'mid', mid);
459+
Hm = this.addDelimiterVPart(styles, c, 'mid', mid);
459460
styles['.MJX-TEX mjx-stretchy-v[c="' + c + '"] > mjx-ext'] = {height: '50%'}
460461
}
461462
const css: StyleData = {};
@@ -464,10 +465,11 @@ export class TeXFont extends FontData {
464465
}
465466
if (He) {
466467
css['border-bottom-width'] = this.em0(He - .03);
467-
css['margin-bottom'] = this.em(-He);
468+
styles['.MJX-TEX mjx-stretchy-v[c="' + c + '"] > mjx-end'] = {'margin-top': this.em(-He)};
468469
if (mid) {
469-
styles['.MJX-TEX mjx-stretchy-v[c="' + c + '"] > mjx-ext:last-of-type'] = {
470-
'margin-top': this.em(-He)
470+
styles['.MJX-TEX mjx-stretchy-v[c="' + c + '"] > mjx-mid'] = {
471+
'margin-top': this.em(-Hm/2),
472+
'margin-bottom': this.em(-Hm/2)
471473
};
472474
}
473475
}

0 commit comments

Comments
 (0)