From 2b768174a8e28b6f636c4c8db03f373d54e2f086 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 23 Dec 2023 20:06:13 +0530 Subject: [PATCH] add compatibility fixes for papermod <-> chroma --- assets/css/includes/chroma-mod.css | 20 ++++++++++++++++++++ layouts/partials/head.html | 5 +++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 assets/css/includes/chroma-mod.css diff --git a/assets/css/includes/chroma-mod.css b/assets/css/includes/chroma-mod.css new file mode 100644 index 0000000..63a482c --- /dev/null +++ b/assets/css/includes/chroma-mod.css @@ -0,0 +1,20 @@ +.chroma { + background-color: unset !important; +} + +.chroma .hl { + display: flex; +} + +table pre.chroma code { + padding: 0.4rem 0; +} + +/* .chroma .lntd:first-of-type { + padding-inline-start: 10px; +} + +.chroma .lntd:last-of-type { + padding-inline-end: 10px; + width: 100%; +} */ diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3319bc8..3e55c67 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -57,9 +57,10 @@ {{- /* markup.highlight.noClasses should be set to `false` */}} {{- $chroma_styles := (resources.Get "css/includes/chroma-styles.css") }} +{{- $chroma_mod := (resources.Get "css/includes/chroma-mod.css") }} {{- /* order is important */}} -{{- $core := (slice $theme_vars $reset $common $chroma_styles $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} +{{- $core := (slice $theme_vars $reset $common $chroma_styles $chroma_mod $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} {{- /* bundle all required css */}} @@ -123,7 +124,7 @@ --secondary: rgb(155, 156, 157); --tertiary: rgb(65, 66, 68); --content: rgb(196, 196, 197); - --hljs-bg: rgb(46, 46, 51); + --code-block-bg: rgb(46, 46, 51); --code-bg: rgb(55, 56, 62); --border: rgb(51, 51, 51); }