[wp-trac] [WordPress Trac] #50120: [Multiple Bundled Themes] Custom color palette styles need to be added to the editor stylesheet
WordPress Trac
noreply at wordpress.org
Wed Nov 11 22:23:18 UTC 2020
#50120: [Multiple Bundled Themes] Custom color palette styles need to be added to
the editor stylesheet
--------------------------------------+-----------------------
Reporter: kjellr | Owner: notlaura
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.6
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback | Focuses: css
--------------------------------------+-----------------------
Comment (by notlaura):
Ah, indeed - the inline text color is updated to the user-selected one on
the front-end, but not in the editor (I did not know the text color option
existed there! Nice).
In TwentyTwenty this looks to be a specificity battle - in
twentytwenty/assets/css/editor-style-block.css, the styles that apply the
default color palette are overriding those added in the
twentytwenty_generate_css method (see above).
If we can remove `:root` from the selector in this block of styles:
{{{
/* CUSTOM COLORS */
:root .has-accent-color {
color: #cd2653;
}
:root .has-accent-background-color {
background-color: #cd2653;
color: #fff;
}
/* etc */
}}}
...then the user-selected colors were applied as expected when I tested.
Does anyone know if this specificity added by `:root` required?
I haven't created a patch before, so I am figuring that out, and I can
push up this change tomorrow if someone else hasn't gotten to it yet!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50120#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list