Image block style - .is-style-rounded overrides my block style css #35151
Labels
[Block] Image
Affects the Image Block
CSS Styling
Related to editor and front end styles, CSS-specific issues.
Description
I've created a custom block style for applying rounded corners to block images. However, after a recent WP core update I noticed my block styles were being overridden by the core block library css. It resets the border-radius for all block images to
border-radius: inherit
. So now I need to increase the specificity of my css in order to apply my styles. The high specificity of this css makes it difficult to apply custom styles and sets a precedent where I'm worried my custom styles will be overridden by a core update.Is there a reason why the block image css wasn't simply written as
.wp-block-image img { border-radius: inherit; }
?block-library/style.min.css
custom-block-styles.css
PS, we use the rounded corner style on the site so removing it isn't an option.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: