Skip to content

Commit 779ef0f

Browse files
committed
Move Safari work-around to main styles, so it is always added to the initial stylesheet, otherwise is can cause errors in non-WebKit browsers when added dynamically
1 parent 9c0eee7 commit 779ef0f

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

ts/output/chtml.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,17 @@ CommonOutputJax<N, T, D, CHTMLWrapper<N, T, D>, CHTMLWrapperFactory<N, T, D>, CH
113113
color: 'red',
114114
'background-color': 'yellow'
115115
},
116-
'mjx-mphantom': {visibility: 'hidden'}
116+
'mjx-mphantom': {
117+
visibility: 'hidden'
118+
},
117119

120+
//
121+
// WebKit-specific CSS to handle bug with clipped characters.
122+
// (test found at https://browserstrangeness.bitbucket.io/css_hacks.html#safari)
123+
//
124+
'_::-webkit-full-page-media, _:future, :root mjx-container': {
125+
'will-change': 'opacity'
126+
}
118127
};
119128

120129
/**

ts/output/chtml/Wrappers/TextNode.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ CommonTextNodeMixin<CHTMLConstructor<any, any, any>>(CHTMLWrapper) {
5858
'mjx-utext': {
5959
display: 'inline-block',
6060
padding: '.75em 0 .2em 0'
61-
},
62-
//
63-
// WebKit-specific CSS to handle bug with clipped characters.
64-
// (test found at https://browserstrangeness.bitbucket.io/css_hacks.html#safari)
65-
//
66-
'_::-webkit-full-page-media, _:future, :root mjx-container': {
67-
'will-change': 'opacity'
6861
}
6962
};
7063

0 commit comments

Comments
 (0)