Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight.js -> Hugo's chromastyles #1364

Merged
merged 9 commits into from
Dec 31, 2023
Prev Previous commit
Next Next commit
add compatibility fixes for papermod <-> chroma
  • Loading branch information
adityatelange committed Dec 23, 2023
commit 2b768174a8e28b6f636c4c8db03f373d54e2f086
20 changes: 20 additions & 0 deletions assets/css/includes/chroma-mod.css
Original file line number Diff line number Diff line change
@@ -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%;
} */
5 changes: 3 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 */}}
Expand Down Expand Up @@ -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);
}
Expand Down