feat: numbered lines for code blocks

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson
2023-10-29 21:25:20 +01:00
parent b0adb473dc
commit f64276790d
6 changed files with 47 additions and 45 deletions

View File

@@ -1,30 +1,28 @@
.prose {
pre {
@apply rounded-sm border border-gray-light-200 p-3 dark:border-gray-dark-400;
}
:not(pre) > code {
display: inline-block;
margin: 0 !important;
white-space: nowrap;
font-weight: 400;
padding: 0 4px;
border: 1px solid;
border-radius: theme("spacing.1");
background: theme("colors.gray.light.200");
border-color: theme("colors.gray.light.300");
.dark & {
background: theme("colors.gray.dark.200");
border-color: theme("colors.gray.dark.300");
}
}
code::before {
content: "";
}
code::after {
content: "";
.highlight, :not(pre) > code {
font-size: .875em;
border: 1px solid;
border-radius: theme("spacing.1");
border-color: theme("colors.gray.light.300");
.dark & {
background: theme("colors.gray.dark.200");
border-color: theme("colors.gray.dark.300");
}
}
.highlight {
@apply p-3 my-4 overflow-x-auto;
background: theme("colors.white");
}
:not(pre) > code {
background: theme("colors.gray.light.200");
display: inline-block;
margin: 0;
white-space: nowrap;
font-weight: 400;
padding: 0 4px;
}
.chroma {
/* LineTableTD */
.lntd {