How do you apply a style to code blocks in GitBook?

Viewed 2148

I want to change the appearance of the code sections generated using ``` and ` markdown.

My book.json is

{
    "styles": {
        "website": "styles/website.css"
    }
}

and my styles/website.css says about the simplest thing I could come up with to test:

/* CSS for website */

code {
  background-color: red;
}

But my GitBook code blocks don't have a red background: https://lokathor.gitbooks.io/haskell-stuff/content/general/using_st.html

When I open the page and look in chrome's dev console, there are code tags and so on, such as <code>runST :: (forall s. ST s a) -&gt; a</code>, so I'm not clear on what's wrong. I don't really know CSS and I don't really know much GitBook, so it seems like I could be doing just about anything wrong.

2 Answers
Related