We switched to a manual approval system for registration on this forum, as this makes it easier to keep bots out of the forum. We'll approve everybody who doesn't look like a bot!

How to set the background for a fenced code block?

Hello,

How do I set the background for a fenced code block to look something like this?

code block

I tried adding the following custom CSS, but this only highlighted the text, but didn't change the background of the whole block.

.cm-fenced-code {
  background: #E6E6E6;
}

Anybody has a suggestion how to do this?

Thanks in advance,
Peter

Comments

  • This is not possible on a pure CSS basis, some changes are needed to the core, but there's already an issue over at GitHub. Simply stay tuned when this gets closed!

Sign In or Register to comment.