diff options
author | Ayush Agarwal <ayush@fastmail.in> | 2019-10-28 00:01:18 +0300 |
---|---|---|
committer | Ayush Agarwal <ayush@fastmail.in> | 2019-10-28 00:01:18 +0300 |
commit | 962bf11028d895e40520bc18cb6dee28c455c553 (patch) | |
tree | de10daaf0fda2459cbd41c7e7d9759bd320a52dd | |
parent | c884d50865d8bc08cbe9e643c4a8543f8ccd090e (diff) |
fixed the syntax highlighting done by chroma
the default style.css file in the kiss theme file didn't differentiate
between code with and without syntax highlighting. as a result, using
the Chroma syntax highlighter doesn't inherit the foreground and
background color of the chosen theme.
the <code> element generated by Chroma has an attribute called
`data-lang` whose value is the programming language being highlighted.
we can use 'data-lang` in a CSS selector to make Chroma generated <code>
inherit the background and foreground color from the theme being used.
-rw-r--r-- | static/css/style.css | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/static/css/style.css b/static/css/style.css index 4688229..d18925f 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -174,6 +174,11 @@ pre code { color: #42464c; } +code[data-lang] { + background-color: inherit; + color: inherit; +} + *, :after, :before { |