I’ve a customized WordPress theme. After I change the colour within the block editor and preview the web page the colour doesn’t replace. I can alter the sort measurement, weight, alignment, and so forth. however not the colour.
I’ve tried targetting the id
of the container div
and whereas it should take different values if specified it won’t take the colour from the block editor regardless of the HTML tags receiving the assigned lessons from WordPress.
Extra frustratingly, is that if I add a colour manually within the Chrome Inspector to the beneath code #landing-template.entry-content h2
for instance, the colour will replace as a result of it is targetted appropriately.
I’ve offered code beneath in addition to screenshots for context.
CSS – Targetting the containing
#landing-template.entry-content h2,
#landing-template.entry-content p{
colour:inherit !essential; /* I've tried different values reminiscent of preliminary and unset and eradicating the decision to this completely to no desired impact */
font-weight:inherit !essential; /* Altering font-weight not an issue */
}
Determine 1: As seen in Chrome Inspector: the id, class and aspect targetted is on and proper if I had been to manually kind in colour:pink
within the Chrome Inspector it might work. Nonetheless it won’t take the WordPress block editor colours
Determine 2 that is the HTML aspect because it seems within the DOM with the WordPress lessons reminiscent of .has-text-color
Determine 3: As talked about earlier modifying the colour straight within the Chrome Inspector does work. On this instance within the colour selector colour:blue
does replace the aspect to blue
. Nonetheless, it won’t take the WordPress colour assigned within the editor