40a4d53fb3
While this does work pretty well in my quick testing, it's *very much* a hack since as far as I can tell there's no support in the CSS specification for using e.g. a CSS variable to override a `@media (prefers-color-scheme: dark) {...}` block. The solution implemented here is thus to *edit* the viewer CSS, by either removing the entire `@media ...` block in light-mode or by ensuring that its rules become *unconditionally* applied in dark-mode. To simplify the overall implementation, since all of this does seem like somewhat of an edge-case, the `viewerCssTheme` preference will *only* be read during viewer initialization. (Similar to many other existing preferences, a reload is thus required when changing it.) |
||
---|---|---|
.. | ||
options | ||
pageAction | ||
.eslintrc | ||
.gitignore | ||
contentscript.js | ||
contentstyle.css | ||
extension-router.js | ||
icon16.png | ||
icon19.png | ||
icon38.png | ||
icon48.png | ||
icon128.png | ||
manifest.json | ||
pdfHandler-vcros.js | ||
pdfHandler.html | ||
pdfHandler.js | ||
preferences_schema.json | ||
preserve-referer.js | ||
restoretab.html | ||
restoretab.js | ||
suppress-update.js | ||
telemetry.js |