Skip to content

Commit 6b86d27

Browse files
committed
[stable15] Set Edge < 16 as incompatible with css vars
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent 843626a commit 6b86d27

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/js/js.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,8 +1351,13 @@ function initCore() {
13511351
}
13521352

13531353
// css variables fallback for IE
1354-
if (msie > 0 || trident > 0) {
1355-
cssVars();
1354+
if (msie > 0 || trident > 0 || edge > 0) {
1355+
console.debug('Legacy browser detected, applying css vars polyfill')
1356+
cssVars({
1357+
// set edge < 16 as incompatible
1358+
onlyLegacy: !(/Edge\/([0-9]{2})\./i.test(navigator.userAgent)
1359+
&& parseInt(/Edge\/([0-9]{2})\./i.exec(navigator.userAgent)[1]) < 16)
1360+
});
13561361
}
13571362

13581363
$(window).on('unload.main', function() {

0 commit comments

Comments
 (0)