Skip to content

Commit 5650c74

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 7c43778 + 314142c commit 5650c74

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ts/adaptors/HTMLAdaptor.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface MinHTMLElement<N, T> {
6969
className: string;
7070
classList: DOMTokenList;
7171
style: OptionList;
72-
sheet?: {insertRule: (rule: string) => void};
72+
sheet?: {insertRule: (rule: string, index?: number) => void};
7373

7474
childNodes: (N | T)[] | NodeList;
7575
firstChild: N | T | Node;
@@ -518,7 +518,11 @@ AbstractDOMAdaptor<N, T, D> implements MinHTMLAdaptor<N, T, D> {
518518
*/
519519
public insertRules(node: N, rules: string[]) {
520520
for (const rule of rules.reverse()) {
521-
node.sheet.insertRule(rule);
521+
try {
522+
node.sheet.insertRule(rule, 0);
523+
} catch (e) {
524+
console.warn(`MathJax: can't insert css rule '${rule}': ${e.message}`);
525+
}
522526
}
523527
}
524528

ts/output/chtml/Wrappers/mo.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ CommonMoMixin<CHTMLConstructor<any, any, any>>(CHTMLWrapper) {
6565
width: 'initial'
6666
},
6767
'mjx-stretchy-h > mjx-ext': {
68-
overflow: 'hidden',
68+
'/* IE */ overflow': 'hidden',
69+
'/* others */ overflow': 'clip visible',
6970
width: '100%'
7071
},
7172
'mjx-stretchy-h > mjx-ext > mjx-c::before': {
@@ -103,7 +104,8 @@ CommonMoMixin<CHTMLConstructor<any, any, any>>(CHTMLWrapper) {
103104
height: '100%',
104105
'box-sizing': 'border-box',
105106
border: '0px solid transparent',
106-
overflow: 'hidden'
107+
'/* IE */ overflow': 'hidden',
108+
'/* others */ overflow': 'visible clip',
107109
},
108110
'mjx-stretchy-v > mjx-ext > mjx-c::before': {
109111
width: 'initial',

0 commit comments

Comments
 (0)