Wanna customize border-radius | WordPress.org

Hey, I was leaving styles like this alone as I think they are coming to the editor natively. I’ll think on that some more though and investigate the current progress in core.

For the custom css, you can add a class to the block (under “Advanced”), then use that class to apply a border radius to the block. Or you can use the main block class directly:

.wp-block-kevinbatdorf-code-block-pro {
  border-radius: 1rem !important;
  overflow:hidden !important

The !important is necessary to avoid all the themes that attempt to override styles since I can’t guess their specificity (sometimes themes have 5-6 selectors), but you can also override an !important by just making your css rule more specific (add more selectors). I could probably remove the border radius property from the pre tag, but something like the border color, for example, would have to remain as the color could clash with the code block theme chosen (e.g. white border with black theme).

Really good feedback though, I appreciate it.

  • This reply was modified 7 minutes ago by Kevin Batdorf. Reason: fixed typo

Thanks for your suggestion!

It works!

Great! If you have any more suggestions let me know. It’s always good to hear feedback like this. I’ll mark this as resolved for now.

Also, if you’d like to leave a 5 star review you can do so here (they help with search ranking):



This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer