[wp-trac] [WordPress Trac] #51656: add_theme_support() for 'wp-dark-theme' so plugins can use consistent CSS for dark themes
WordPress Trac
noreply at wordpress.org
Wed Oct 28 21:53:49 UTC 2020
#51656: add_theme_support() for 'wp-dark-theme' so plugins can use consistent CSS
for dark themes
-------------------------+------------------------------
Reporter: mpol | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by joyously):
I happen to have authored a theme where the user can choose whatever color
they want, so my theme would have a difficult time with dark mode or your
proposed theme_support field. It also allows the user to easily swap
foreground and background on various elements like sidebar or widgets (or
wherever they put the class). So even if I do analyze the background color
to determine dark or light, they could have swapped it on `#main` or
`#content` and so the analysis is moot. Adding an inaccurate body class
won't solve your problem, and it should work without the theme having to
do anything or it will be forever until adopted.
If your concern is about things like `<select>` being the "correct" color,
it seems that you have tested with themes that don't style everything. My
theme styles `<select>`, and it all matched until a recent update to
Firefox that made my styles not work.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51656#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list