Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pavel-pi/kiss-em.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyush Agarwal <ayush@fastmail.in>2019-10-28 00:01:18 +0300
committerAyush Agarwal <ayush@fastmail.in>2019-10-28 00:01:18 +0300
commit962bf11028d895e40520bc18cb6dee28c455c553 (patch)
treede10daaf0fda2459cbd41c7e7d9759bd320a52dd
parentc884d50865d8bc08cbe9e643c4a8543f8ccd090e (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.css5
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 {