From c2d9e5c40ae4ffa63d6e754cc8dfd3a1a0c3860c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 18 Nov 2017 18:12:58 +0100 Subject: [PATCH] css: code blocks are now darker instead of lighter. I like it better now. Also a few other related fixes. Thanks to @Squareys for the idea! --- css/m-components.css | 7 +++---- css/m-dark.css | 2 +- css/pygments-dark.css | 2 +- css/pygments-dark.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/css/m-components.css b/css/m-components.css index 387c4544..2c61c309 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -1244,6 +1244,8 @@ article section:target figure.m-code-figure { .m-container-inflatable section:target section > figure.m-code-figure > pre:first-child { border-color: var(--line-color); } +.m-container-inflatable section:target > figure.m-code-figure::before, +.m-container-inflatable section:target section > figure.m-code-figure::before, .m-container-inflatable section:target > .m-note.m-default, .m-container-inflatable section:target section > .m-note.m-default { border-left-color: var(--line-color); @@ -1275,12 +1277,9 @@ article section:target figure.m-code-figure { /* Code block (uses Pygments CSS classes) */ pre.m-code span.hll { - border-color: var(--line-color); margin-left: -1.0rem; margin-right: -1.0rem; - border-left-style: solid; - border-left-width: 0.25rem; - padding-left: 0.75rem; + padding-left: 1.0rem; } pre.m-code.m-inverted { color: var(--code-inverted-color); diff --git a/css/m-dark.css b/css/m-dark.css index bd82a136..1711056d 100644 --- a/css/m-dark.css +++ b/css/m-dark.css @@ -55,7 +55,7 @@ --mark-background-color: #c7cf2f; --code-color: #e6e6e6; --code-inverted-color: rgba(230, 230, 230, 0.33); - --code-background-color: #34424d; + --code-background-color: #22272e; /* Header */ --header-border-width: 0 0 0.25rem 0; diff --git a/css/pygments-dark.css b/css/pygments-dark.css index 8f705c31..16d1510f 100644 --- a/css/pygments-dark.css +++ b/css/pygments-dark.css @@ -1,4 +1,4 @@ -.m-code .hll { background-color: #405363 } +.m-code .hll { background-color: #34424d } .m-code .c { color: #a5c9ea } /* Comment */ .m-code .k { color: #ffffff; font-weight: bold } /* Keyword */ .m-code .n { color: #dcdcdc } /* Name */ diff --git a/css/pygments-dark.py b/css/pygments-dark.py index 535321a7..23b3ff50 100644 --- a/css/pygments-dark.py +++ b/css/pygments-dark.py @@ -30,7 +30,7 @@ from pygments.token import Keyword, Name, Comment, String, Error, \ class DarkStyle(Style): background_color = None - highlight_color = '#405363' + highlight_color = '#34424d' default_style = "" styles = { -- 2.30.2