fix: code when adding linenos

This commit is contained in:
Ungol 2025-12-23 22:27:52 +01:00
parent b2286abd85
commit 6aa8bdc754
2 changed files with 37 additions and 2 deletions

View file

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

View file

@ -1,4 +1,5 @@
pre {
position: relative;
font-family: var(--mono-font);
padding: 1.25rem;
border-radius: var(--standard-border-radius);
@ -6,11 +7,45 @@ pre {
border-color: var(--overlay0);
border-width: 0.15rem;
line-height: initial;
overflow-x: scroll;
overflow: hidden;
overflow-x: auto;
&>code {
background-color: 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;
}
}