From 274a6b4ec448a4f78e5d8076d1f0ec28c43c7be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Avijit=20=F0=9F=9A=80?= <526avijit@gmail.com> Date: Mon, 2 Aug 2021 13:17:52 +0200 Subject: [PATCH] Fix code pre coloring --- themes/gokarna/static/css/dark.css | 4 ++++ themes/gokarna/static/css/main.css | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/themes/gokarna/static/css/dark.css b/themes/gokarna/static/css/dark.css index 03a21a0..51ca2a0 100644 --- a/themes/gokarna/static/css/dark.css +++ b/themes/gokarna/static/css/dark.css @@ -54,6 +54,10 @@ table th { border-bottom-color: var(--dark-header-divider-color); } +:not(pre) > code { + color: var(--dark-text-color); +} + /* TODO: Check if this is needed or not */ /* img, diff --git a/themes/gokarna/static/css/main.css b/themes/gokarna/static/css/main.css index eb3e73f..62873c1 100644 --- a/themes/gokarna/static/css/main.css +++ b/themes/gokarna/static/css/main.css @@ -212,7 +212,7 @@ img { /* CODE BLOCKS */ code, pre { - background-color: #1f1f1f !important; + background-color: #272822 !important; box-sizing: border-box; color: white; } @@ -230,6 +230,12 @@ code { font-size: 0.8em; } +:not(pre) > code { + background-color: #e0e0e0 !important; + color: var(--light-text-color); + padding: 1px 4px; +} + pre code { font-size: 1em; }