Skip to content

Commit 147c91f

Browse files
committed
Work around WebKit bug with CHTML characters. (mathjax/MathJax#2435)
1 parent 53b13c0 commit 147c91f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

ts/output/chtml/Wrappers/TextNode.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ 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+
'@supports (-webkit-marquee-repetition:infinite) and (object-fit:fill)': {
67+
//
68+
// We don't really support nested CSS, so fake it byt putting the CSS
69+
// directly in the string, and commenting out the colon that is
70+
// inserted after the selector (that would normally be a CSS property name)
71+
// See issue #2435.
72+
//
73+
'mjx-c::before/*': '*/ {will-change: opacity}'
6174
}
6275
};
6376

0 commit comments

Comments
 (0)