I am rendering code snippets via pygments and markdown in my little static blog generator and I am having a problem with the pygments and twitter bootstrap.
Here is my problem:
I want code snippets to be highlighted with dark-solarized theme for pygments. I downloaded it to:
/lib/python2.7/site-packages/pygments/styles
Testing works as expected:
$ pygmentize -l python -f html -O full,style=solarized -o ./snippet.html ./test.sh
This produces an html file which looks as I expected:
hoora! pygments work! Now, this is how the code is highlighted in my blog post:
bummer … this looks bad …
If I comment out:
<link href="/media/css/bootstrap.min.css" rel="stylesheet">
The syntax highlighting works as expected:
So, my question is: how do I make twitter-bootstrap play along with pygments?
2
Answers
I figured it out, after a while of thinking how this question can and if it should be written.
For the benefit of others, the solutions was to define the color of the
pre
element:This now works as expected.
Override Bootstrap CSS for Pygments Syntax Highlighting: