Proposal: Apply the Theme
component to the sidebar of the Site Editor
#53430
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Inspired by #53262
The sidebar background of the Site Editor is a dark color. In the components used in it, a lot of style overrides are occurring, especially in pseudo-classes such as
:focus/:hover:-focus-visible
, to match the dark background color. Also, as reported in #52594, if the button has any conditions, additional styles are needed to fix.Also, the blue focus outline based on the
--wp-admin-theme-color
CSS variable does not seem to match the dark background color.What is your proposed solution?
With #53262, the
Theme
component can now be used outside of@wordpress/components
package.By applying the
Theme
component to the entire sidebar and passing the appropriate color props for the sidebar to theTheme
component, the components within the sidebar should behave with the appropriate style based on the generated--wp-components-color-{variation}
CSS variables. At the same time, numerous style overrides should be unnecessary.Screencast
The following is the behavior of the
Theme
component applied to the sidebar on a trial basis, assuming some styling adjustments were made.To reproduce this screencast, the following changes are required:
Details
This is of course not ideal, since the color code is hard-coded into the component props.
This screencast shows that the focus outline is white and at the same time, the problem shown in #52594 has been solved.
3fb07d0c712849b45467cb2bc5271b98.mp4
The text was updated successfully, but these errors were encountered: