-
Apparently, Chrome extensions don't have access to the
prefers-color-scheme
media query. You have to read it via JavaScript atchrome.devtools.panels.themeName
. AFAICT, there's no way to get this directly via CSS or listen for changes. bugs.chromium.org/p/chromium/issues/detail?id=608869 #DarkTheme -
It's so sad to see Chrome extension infrastructure diverging from web like this for no apparent reason. @ChromeDevTools is there a reason behind this discrepancy? DevTools itself supports dark theme, yet extensions can't easily do the same?
-
@ChromeDevTools Quick correction: Apparently changing the theme restarts DevTools with the new value, so you don't actually need an API to listen for changes. That said, it's a less-than-ideal user experience and I'm not sure why that needs to be the case?