Fix visual of DOM inspector layer in dark theme mode

Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2359
This commit is contained in:
Raymond Hill 2022-11-17 09:25:20 -05:00
parent d9744d012a
commit 105c7f5446
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 8 additions and 1 deletions

View File

@ -784,6 +784,12 @@ const bootstrap = function(ev) {
} }
const pickerDoc = ev.target.contentDocument; const pickerDoc = ev.target.contentDocument;
pickerDoc.documentElement.style.setProperty(
'color-scheme',
'dark light',
'important'
);
const style = pickerDoc.createElement('style'); const style = pickerDoc.createElement('style');
style.textContent = [ style.textContent = [
'body {', 'body {',
@ -855,6 +861,7 @@ pickerRoot.style.cssText = [
'border: 0', 'border: 0',
'border-radius: 0', 'border-radius: 0',
'box-shadow: none', 'box-shadow: none',
'color-scheme: light dark',
'display: block', 'display: block',
'height: 100%', 'height: 100%',
'left: 0', 'left: 0',

View File

@ -1272,6 +1272,7 @@ const pickerCSSStyle = [
'border: 0', 'border: 0',
'border-radius: 0', 'border-radius: 0',
'box-shadow: none', 'box-shadow: none',
'color-scheme: light dark',
'display: block', 'display: block',
'filter: none', 'filter: none',
'height: 100vh', 'height: 100vh',
@ -1291,7 +1292,6 @@ const pickerCSSStyle = [
'visibility: hidden', 'visibility: hidden',
'width: 100%', 'width: 100%',
'z-index: 2147483647', 'z-index: 2147483647',
'color-scheme: light dark',
'' ''
]; ];