Skip to content

Commit c763f00

Browse files
committed
Codeblock: Make highlighted lines stretch to end + fix border
1 parent 9c23ffb commit c763f00

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

assets/css/v2/style.css

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ textarea:not([rows]) {
156156
--color-inline_codeblock-border: 0.85 0 0;
157157
--color-inline_codeblock-background: 0.98 0 0;
158158
--color-codeblock-border: 0.63 0 0;
159-
--color-codeblock-shadow: 0.92 0 0;
160159
--color-codeblock-background: 1 0 0;
161160
--color-codeblock-highlight: 0.99 0.0479 105.97;
162161
--color-footer: 0.23 0 0;
@@ -199,6 +198,7 @@ textarea:not([rows]) {
199198
--codeblock-comment-space-between: 10px;
200199
--codeblock-horizontal-line-length: 2rem;
201200
--codeblock-horizontal-line-overflow: 0.25rem;
201+
--codeblock-horizontal-padding: 1rem;
202202
--codeblock-border-thickness: 1px;
203203
--codeblock-code-section-padding-left: 1rem;
204204
--codeblock-line-box-side-length: 4px;
@@ -1839,12 +1839,21 @@ a:has(code:not(pre code)) {
18391839

18401840
/* Regular Codeblock */
18411841
.highlight {
1842-
padding: 0 1rem 0 1rem;
1842+
padding: 0 var(--codeblock-horizontal-padding) 0
1843+
var(--codeblock-horizontal-padding);
18431844
position: relative;
18441845
flex: 1;
18451846

1846-
code .cl {
1847-
position: relative;
1847+
code {
1848+
font-size: var(--font-step--1);
1849+
1850+
.cl {
1851+
position: relative;
1852+
}
1853+
}
1854+
1855+
table {
1856+
width: calc(100% + var(--codeblock-horizontal-padding));
18481857
}
18491858
}
18501859

@@ -1875,10 +1884,6 @@ a:has(code:not(pre code)) {
18751884
/* margin: 1.5rem 0 0.25rem 0; */
18761885
}
18771886

1878-
.highlight code {
1879-
font-size: 0.875rem;
1880-
}
1881-
18821887
.highlight-v2.single-line {
18831888
display: flex;
18841889
align-items: center;
@@ -1902,7 +1907,7 @@ a:has(code:not(pre code)) {
19021907
}
19031908

19041909
.code-container {
1905-
box-shadow: 2px 2px 0px oklch(var(--color-codeblock-shadow));
1910+
box-shadow: 3px 3px 0px oklch(var(--color-shadow));
19061911
}
19071912

19081913
ol .code-block,

0 commit comments

Comments
 (0)