• Resolved temmy3312

    (@temmy3312)


    Hi, I really like this plugin.

    But I suggest adding an option for us to customize the border-radius of the code block.

    I notice that most of the css styles are set as !important, which makes them unable to be overridden by my own css code.

    Can you add an option for customizing the border-radius?
    or remove !important from those properties?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kevin Batdorf

    (@kbat82)

    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 1 year, 10 months ago by Kevin Batdorf. Reason: fixed typo
    Thread Starter temmy3312

    (@temmy3312)

    Thanks for your suggestion!

    It works!

    Plugin Author Kevin Batdorf

    (@kbat82)

    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):

    https://www.ads-software.com/support/plugin/code-block-pro/reviews/#new-post

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wanna customize border-radius’ is closed to new replies.