transition patch is redundant in Chrome 93+
This commit is contained in:
parent
619f771b4a
commit
614dce0e8c
|
@ -15,7 +15,7 @@ window.StyleInjector = window.INJECTED === 1 ? window.StyleInjector : ({
|
|||
const list = [];
|
||||
const table = new Map();
|
||||
let isEnabled = true;
|
||||
let isTransitionPatched;
|
||||
let isTransitionPatched = chrome.app && CSS.supports('accent-color', 'red'); // Chrome 93
|
||||
let exposeStyleName;
|
||||
// will store the original method refs because the page can override them
|
||||
let creationDoc, createElement, createElementNS;
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
html#stylus #header *:not(#\1transition-suppressor) {
|
||||
@supports not (accent-color: red) {
|
||||
/* This suppresses a bug in all? browsers: they apply transitions during page load.
|
||||
* It was fixed by crrev.com/886802 in Chrome 93, which we detect via `accent-color`.
|
||||
* Using an increased specificity to override sane selectors in user styles.
|
||||
* Using \1 to simplify js code because \0 is converted to \xFFFD per spec. */
|
||||
transition: none !important;
|
||||
html#stylus #header *:not(#\1transition-suppressor) {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
:root {
|
||||
--family: Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* global $$ $ $create focusAccessibility getEventKeyName moveFocus */// dom.js
|
||||
/* global clamp debounce */// toolbox.js
|
||||
/* global CHROME clamp debounce */// toolbox.js
|
||||
/* global msg */
|
||||
/* global t */// localization.js
|
||||
'use strict';
|
||||
|
@ -24,11 +24,13 @@
|
|||
}
|
||||
});
|
||||
// Removing transition-suppressor rule
|
||||
const {sheet} = $('link[href$="global.css"]');
|
||||
for (let i = 0, rule; (rule = sheet.cssRules[i]); i++) {
|
||||
if (/#\\1\s?transition-suppressor/.test(rule.selectorText)) {
|
||||
sheet.deleteRule(i);
|
||||
break;
|
||||
if (!CHROME || CHROME < 93) {
|
||||
const {sheet} = $('link[href$="global.css"]');
|
||||
for (let i = 0, rule; (rule = sheet.cssRules[i]); i++) {
|
||||
if (/#\\1\s?transition-suppressor/.test(rule.cssText)) {
|
||||
sheet.deleteRule(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user