How to style Code Blocks and Fenced Code Blocks in Markdown with CSS

Continuing the discussion from Stylesheets for Markdown?:

Hi, I have been searching this forum and the internet for “how to style code blocks and fenced code blocks in markdown”, and found a mention of it in this topic in the linked thread but sadly nothing seems to be working. I have two stylesheets and alternate the editing and uploading between each of them to avoid having to restart DEVONthink after each edit… anyway if i could see what i was doing it would be a piece of cake. Is there any way to inspect the code that gets rendered on the preview page, are the code blocks pre tags or code tags or something else, is there a tag list, or an api or something that you are aware of that will help?

I’m not sure how a tag list would be of use.
And no, there’s no API.

Have you enabled Preferences > Media > Markdown > Prism support?

I’m not sure that I understand what you’re asking. But you could simply convert the md to HTML (context menu in DT) and then have a look at the HTML code (browser, editor, whatever).
But if you’re after code highlighting (are you?), prism is your friend. And as @BLUEFROG said: It has to be enabled in the settings.

{I have prism enabled and it’s great but for this particular use case where i want an inline block of text (not code) to stand out it would be nice if i could add a background colour and some padding.}

Yes, you’re right highlighting is what i’m looking for. That’ll do nicely!