1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 01:59:38 +02:00

Reset Chromium-specific color-scheme CSS property

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1408
This commit is contained in:
Raymond Hill 2020-12-21 09:20:56 -05:00
parent f6234516f4
commit ea71e93c81
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1223,11 +1223,21 @@ const pickerCSSStyle = [
'width: 100%',
'z-index: 2147483647',
''
].join(' !important;');
];
// https://github.com/uBlockOrigin/uBlock-issues/issues/1408
// We need to reset Chromium-specific `color-scheme` property
// for our iframe widget.
if (
CSS.supports instanceof Function &&
CSS.supports('color-scheme', 'initial')
) {
pickerCSSStyle.push('color-scheme: initial');
}
const pickerCSS = `
:root > [${vAPI.sessionId}] {
${pickerCSSStyle}
${pickerCSSStyle.join(' !important;')}
}
:root [${vAPI.sessionId}-clickblind] {
pointer-events: none !important;