@thgr, I’ve has a look at your website.
When looking at the css tree in the inspector of the browser, the issue is quite clear: It’s a specificity issue. The most specific rule wins.
The problem is caused by this rule in theme.min.css.
pre code:not(.hljs):not([class*=language-]) {
background: #f8f8f8;
}
This rule is more specific than pre code
and hence it wins.
Two possible solutions:
- Make you generated code more specific. In you markdown use
```html mon texte mon texte ```
Which will be translated into :
Now the rule form theme.min.css will no longer match the block quote.<pre><code class="language-html"> mon texte mon texte </code></pre>
- Or you could change custom.css to match the specificity from theme.min.css
Now the last rule (the one from custom.css) will win.pre code:not(.hljs):not([class*=language-]) { background: red; }