Merge pull request #18735 from dvdksn/code-hl-lines

feat: add support for hl_lines
This commit is contained in:
David Karlsson 2023-11-27 11:01:06 +01:00 committed by GitHub
commit fb87f9c93f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 5 deletions

View File

@ -23,7 +23,7 @@
padding: 0 4px;
}
.chroma {
.highlight {
/* LineTableTD */
.lntd {
vertical-align: top;
@ -33,12 +33,20 @@
}
/* LineTable */
.lntable {
display: table;
width: 100%;
border-spacing: 0;
padding: 0;
margin: 0;
border: 0;
/* LineNumberColumnHighlight */
.lntd:first-child .hl {
display: block;
}
}
@at-root .light {
/* LightTheme */
.light & {
/* Other */
.x {
color: #000000;
@ -52,7 +60,12 @@
}
/* LineHighlight */
.hl {
background-color: #ffffcc;
background-color: #e5f2fc;
}
.lntd:first-child .hl,
& > .chroma > code > .hl {
margin-left: -4px;
border-left: 4px solid #c0e0fa;
}
/* LineNumbersTable */
.lnt {
@ -407,7 +420,7 @@
}
}
@at-root .dark {
.dark & {
/* Other */
.x {
}
@ -419,7 +432,12 @@
}
/* LineHighlight */
.hl {
background-color: #ffffcc;
background-color: theme('colors.gray.dark.300');
}
.lntd:first-child .hl,
& > .chroma > code > .hl {
margin-left: -4px;
border-left: 4px solid theme('colors.gray.dark.400');
}
/* LineNumbersTable */
.lnt {