cgit: add line highlighting

This commit is contained in:
Gabriel Fontes
2022-08-22 19:58:56 -03:00
parent 50af6390fa
commit 6f2a5e5e14
+20
View File
@@ -1,6 +1,10 @@
td.linenos {
width: 2em;
font-size: 0.9em;
padding-top: 1.28em;
}
/* Highlight diff */
code span.head {
color: var(--highlight);
}
@@ -16,3 +20,19 @@ code span.add {
code span.del {
color: var(--negative);
}
/* Light up targeted line (for linking, etc) */
pre > code {
position: relative;
}
pre > code a {
height: 1.18rem;
width: 101.96%;
position: absolute;
left: -1em;
pointer-events: none;
}
pre > code a:target {
background-color: var(--highlight);
opacity: 0.3;
}