mirror of https://github.com/gorhill/uBlock.git
dom-inspector/element-picker: Ensure frame background is transparent.
This fixes the element picker on dark color-scheme websites on Firefox Nightly and Chrome Canary at least, see: * https://bugzilla.mozilla.org/show_bug.cgi?id=1771047 * https://github.com/w3c/csswg-drafts/issues/4772 This improves on the existing (not quite correct, was relying on a Chromium bug) fix for Chromium browsers.
This commit is contained in:
parent
7b2319b7cd
commit
51983afb0e
|
@ -1281,19 +1281,11 @@ const pickerCSSStyle = [
|
||||||
'visibility: visible',
|
'visibility: visible',
|
||||||
'width: 100%',
|
'width: 100%',
|
||||||
'z-index: 2147483647',
|
'z-index: 2147483647',
|
||||||
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/1408
|
||||||
|
'color-scheme: light',
|
||||||
''
|
''
|
||||||
];
|
];
|
||||||
|
|
||||||
// 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 = `
|
const pickerCSS = `
|
||||||
:root > [${vAPI.sessionId}] {
|
:root > [${vAPI.sessionId}] {
|
||||||
${pickerCSSStyle.join(' !important;')}
|
${pickerCSSStyle.join(' !important;')}
|
||||||
|
|
Loading…
Reference in New Issue