fix: code when adding linenos

This commit is contained in:
Alexis Fourmaux 2025-05-17 01:56:34 +02:00
parent 9d15a6ebd6
commit 7d867a68a0
2 changed files with 37 additions and 2 deletions

View file

@ -28,7 +28,7 @@ Oechalidum[^second] limus posse.
[^second]: Footnote text. [^second]: Footnote text.
```c# ```c#,linenos,name=example.cs
using System.IO.Compression; using System.IO.Compression;
#pragma warning disable 414, 3021 #pragma warning disable 414, 3021

View file

@ -1,4 +1,5 @@
pre { pre {
position: relative;
font-family: var(--mono-font); font-family: var(--mono-font);
padding: 1.25rem; padding: 1.25rem;
border-radius: var(--standard-border-radius); border-radius: var(--standard-border-radius);
@ -6,11 +7,45 @@ pre {
border-color: var(--overlay0); border-color: var(--overlay0);
border-width: 0.15rem; border-width: 0.15rem;
line-height: initial; line-height: initial;
overflow-x: scroll; overflow: hidden;
overflow-x: auto;
&>code { &>code {
background-color: initial; background-color: initial;
border: initial; border: initial;
padding: 0;
}
&[data-linenos] {
padding: 1.25rem 0;
}
table {
width: 100%;
border-collapse: collapse;
margin: 0;
th,
td,
tr {
border: none;
padding: 0
}
td:nth-of-type(1) {
text-align: center;
vertical-align: top;
user-select: none;
color: var(--overlay1);
}
tr:nth-child(even) td {
background-color: inherit;
}
}
mark {
display: block;
} }
} }