Skip to content

CSS: How to change the style of code? #398

Answered by yhatt
roland-KA asked this question in Q&A
Discussion options

You must be logged in to vote
pre, code {
  background-color: ghostwhite !important;
  color: black;
}

Generally CommonMark transforms the code block in Markdown to the <code> element within the <pre> element. Try styling both pre and code with the same color style.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@roland-KA
Comment options

Answer selected by roland-KA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants