You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am providing content to the webview via my extension. The user can switch between dark and light theme so I would like my content to adjust based on the selected theme.
I think the simplest solution would be to just set a CSS class on the container I am hosted in that reflects the theme that is being used (light or dark).
theme so I would like my content to adjust based on the selected theme.
that sounds like an event but I don't know if we need that. By default, some styles where defined in the * selector. I have know a change where those styles are applied to the body only but its values come from corresponding variables, like so:
I am providing content to the webview via my extension. The user can switch between dark and light theme so I would like my content to adjust based on the selected theme.
I think the simplest solution would be to just set a CSS class on the container I am hosted in that reflects the theme that is being used (light or dark).
Another thought I had was to maybe leverage CSS variables that are available in recent Chrome releases (https://developers.google.com/web/updates/2016/02/css-variables-why-should-you-care?hl=en). I could get access to the base colors a theme defines via variables.
In the end, maybe both things are desired.
@jrieken fyi
The text was updated successfully, but these errors were encountered: