fix: code when adding linenos
This commit is contained in:
parent
b2286abd85
commit
6aa8bdc754
2 changed files with 37 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue