[wp-trac] [WordPress Trac] #53525: On WP 5.8-beta4-51244 inside toggle block inserter default search text is not visible when in dark mode
WordPress Trac
noreply at wordpress.org
Tue Jun 29 07:06:49 UTC 2021
#53525: On WP 5.8-beta4-51244 inside toggle block inserter default search text is
not visible when in dark mode
-----------------------------+-----------------------------
Reporter: alanjacobmathew | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: needs-testing | Focuses: ui
-----------------------------+-----------------------------
Comment (by Joen):
Thank you for the report. The particular property in question,
`add_theme_support( 'dark-editor-style' );` has a varied history, so just
for historical purposes and for anyone coming back to this ticket in the
future, here's a bit of background:
- Its purpose is to allow the block editor to provide contrastful UI
against theme backgrounds. For instance if a theme has a dark blue
background, the blue focus style would not be legible, so the theme could
declare that it was a "dark theme" and the focus style would be white
instead.
- What the property did was output a CSS class, `is-dark-theme`, on the
body tag, so that the UI of the block editor would be able to invert
itself and ensure contrast.
- The actual property has been deprecated and is now fully automated; the
block editor detects if the theme has a dark background and applies the
class.
- Don't confuse the property with the similarly named "dark mode" provided
by operating systems, it has nothing to do with that.
Regarding the specific bug, thank you for the steps to reproduce. I've
tracked it down to a placeholder color property being applied to the block
editor when it shouldn't have been. The fix and furthe details can be
found in this PR: https://github.com/WordPress/gutenberg/pull/33058
I look forward to one day in the future when we can bring actual dark mode
to WordPress and the block editor using {{{@media (prefers-color-scheme:
dark)}}}! But for the time being, this was just a copy paste bug!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53525#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list