From 59e685da08bec2c2a740c084d034e347cdcff761 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:35:36 +0100 Subject: [PATCH] feat: add support for hl_lines Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- assets/css/code.css | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/assets/css/code.css b/assets/css/code.css index 7e2227d108..930e71b3a1 100644 --- a/assets/css/code.css +++ b/assets/css/code.css @@ -23,7 +23,7 @@ padding: 0 4px; } -.chroma { +.highlight { /* LineTableTD */ .lntd { vertical-align: top; @@ -33,12 +33,20 @@ } /* LineTable */ .lntable { + display: table; + width: 100%; border-spacing: 0; padding: 0; margin: 0; border: 0; + /* LineNumberColumnHighlight */ + .lntd:first-child .hl { + display: block; + } } - @at-root .light { + + /* LightTheme */ + .light & { /* Other */ .x { color: #000000; @@ -52,7 +60,12 @@ } /* LineHighlight */ .hl { - background-color: #ffffcc; + background-color: #e5f2fc; + } + .lntd:first-child .hl, + & > .chroma > code > .hl { + margin-left: -4px; + border-left: 4px solid #c0e0fa; } /* LineNumbersTable */ .lnt { @@ -407,7 +420,7 @@ } } - @at-root .dark { + .dark & { /* Other */ .x { } @@ -419,7 +432,12 @@ } /* LineHighlight */ .hl { - background-color: #ffffcc; + background-color: theme('colors.gray.dark.300'); + } + .lntd:first-child .hl, + & > .chroma > code > .hl { + margin-left: -4px; + border-left: 4px solid theme('colors.gray.dark.400'); } /* LineNumbersTable */ .lnt {