Can’t change code block background colour in child theme
-
I have a child theme set up and it has worked well with edits to the style (mainly adding IBM Plex Sans font) and also edits to footer, header and 404 php files.
I want to change the background to
displayed on the site. It is set to 'transparent' in the main theme css. I can see that the code is not in the main style css but in a block.css file. I can add the relevant code to the customise additional css area and it works.
But I want to add it to my child theme. I have tried adding the same code to the style.css file but it does not work. I tried adding a CSS folder and creating a block.css file and adding the code there. That did not work either.
Any advice? I have also not been able to change the font to IBM Plex Mono even though I have the font enqueued in the child theme.
The code I should be able to add is:
.wp-block-code {
background-color: #f1f1f1;
border: 0;
padding: 0;
}And for the font change:
.wp-block-code code {
font-family: IBM Plex Mono, monospace;
font-size: inherit;
}The page I need help with: [log in to see the link]
- The topic ‘Can’t change code block background colour in child theme’ is closed to new replies.