From cfa165e575370943d2c9d7acf879a1abfb094870 Mon Sep 17 00:00:00 2001 From: Hysterelius <71912794+Hysterelius@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:10:21 +1000 Subject: [PATCH 1/2] Fix syntax highlighting --- content/overview-code-blocks.md | 2 +- sass/abridge.scss | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/content/overview-code-blocks.md b/content/overview-code-blocks.md index 4dc0905b..f92e092b 100644 --- a/content/overview-code-blocks.md +++ b/content/overview-code-blocks.md @@ -68,7 +68,7 @@ fn main() { ``` ### Bash -```bash +```bash,hl_lines=5 #!/bin/bash for d in /sys/kernel/iommu_groups/*/devices/*; do n=${d#*/iommu_groups/*}; n=${n%%/*} diff --git a/sass/abridge.scss b/sass/abridge.scss index 008f38cd..49929460 100644 --- a/sass/abridge.scss +++ b/sass/abridge.scss @@ -934,12 +934,28 @@ $syntax: true !default;//syntax highlighting for code blocks // Highlighted text color: var(--h1); mark { - display: block; - color: unset; - padding: 0; - background-color: var(--h0); - filter: brightness(var(--ha)); + border-radius: unset; } + td:first-child { + mark { + border-top-left-radius: var(--br); + border-bottom-left-radius: var(--br); + } + } + td:last-child { + mark { + border-top-right-radius: var(--br); + border-bottom-right-radius: var(--br); + } + } + } + mark { + display: block; + color: unset; + padding: 0; + background-color: var(--h0); + filter: brightness(var(--ha)); + border-radius: var(--br); } td, th, tr { padding: 0; From 8c615af0289ab08c1da2cd8e3689f371a737087a Mon Sep 17 00:00:00 2001 From: Hysterelius <71912794+Hysterelius@users.noreply.github.com> Date: Fri, 9 Aug 2024 07:11:49 +1000 Subject: [PATCH 2/2] Add toggle for rounded corners --- COPY-TO-ROOT-SASS/abridge.scss | 1 + sass/abridge.scss | 29 +++++++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/COPY-TO-ROOT-SASS/abridge.scss b/COPY-TO-ROOT-SASS/abridge.scss index 78be0cf9..03a27096 100644 --- a/COPY-TO-ROOT-SASS/abridge.scss +++ b/COPY-TO-ROOT-SASS/abridge.scss @@ -193,6 +193,7 @@ //$misc: false, //$grid: true,//Infinity Grid, column based layouts. //$syntax: true,//syntax highlighting for code blocks + // $coderoundhighlight: false,//round corners on highlighted code blocks ); @use "extra"; /****************************************************************************** diff --git a/sass/abridge.scss b/sass/abridge.scss index 49929460..af53276b 100644 --- a/sass/abridge.scss +++ b/sass/abridge.scss @@ -223,6 +223,7 @@ $imgswap: true !default;//Image Swap on hover/click $misc: false !default; $grid: true !default;//Infinity Grid, column based layouts. $syntax: true !default;//syntax highlighting for code blocks +$coderoundhighlight: false !default;//round corners on highlighted code blocks /****************************************************************************** @@ -933,20 +934,22 @@ $syntax: true !default;//syntax highlighting for code blocks margin: 0; // Highlighted text color: var(--h1); - mark { - border-radius: unset; - } - td:first-child { + @if $coderoundhighlight { mark { - border-top-left-radius: var(--br); - border-bottom-left-radius: var(--br); + border-radius: unset; } - } - td:last-child { - mark { - border-top-right-radius: var(--br); - border-bottom-right-radius: var(--br); + td:first-child { + mark { + border-top-left-radius: var(--br); + border-bottom-left-radius: var(--br); + } } + td:last-child { + mark { + border-top-right-radius: var(--br); + border-bottom-right-radius: var(--br); + } + } } } mark { @@ -955,7 +958,9 @@ $syntax: true !default;//syntax highlighting for code blocks padding: 0; background-color: var(--h0); filter: brightness(var(--ha)); - border-radius: var(--br); + @if $coderoundhighlight { + border-radius: var(--br); + } } td, th, tr { padding: 0;