[wp-trac] [WordPress Trac] #53530: Twenty Twenty One: Consider disabling darkmode in wp-admin
WordPress Trac
noreply at wordpress.org
Sun Jun 27 17:12:42 UTC 2021
#53530: Twenty Twenty One: Consider disabling darkmode in wp-admin
---------------------------+--------------------
Reporter: Clorith | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.8
Component: Bundled Theme | Version: 5.6
Severity: normal | Keywords:
Focuses: |
---------------------------+--------------------
Darkmode is a front-end feature of the Twenty Twenty-One theme, which lets
a user toggle their viewing preferences.
With this, some unexpected side-effects have come up within wp-admin (see
for example #53525, #53429).
Would it perhaps make more sense to not load dark-mode styles and features
from the theme within the constraints of wp-admin? Some quick testing
shows that this is a simple implementation case, achieved by adding an
`is_admin()` check to the
`Twenty_Twenty_One_Dark_Mode::switch_should_render()` check, and returning
`false` if it is an admin screen.
Although the theme was introduced with WordPress 5.6, and some of the
style-bleeding was present then as well, it is more apparent with the new
widget editor, where the darkmode toggle button renders in each legacy
widget (which all widgets are considered when first loaded by the block
editor for widgets), and it's styles can have unexpected effects on the
site, depending on user settings, as seen in the previously mentioned
#53429.
Adding to the 5.8 milestone for consideration, on the grounds of the
block-widget editor surfacing this issue more broadly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53530>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list