Tweak code CSS a bit to make it nicer
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -55,6 +55,12 @@ pre code {
|
||||
.lntd:last-child {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Insert padding to match the distance of the line number to its
|
||||
// border.
|
||||
.line {
|
||||
padding-left: $code-lineno-spacing;
|
||||
}
|
||||
}
|
||||
|
||||
.lntr {
|
||||
@@ -63,16 +69,27 @@ pre code {
|
||||
|
||||
.lnt {
|
||||
display: block;
|
||||
padding: 0 1rem 0 1rem;
|
||||
color: $code-lineno-color;
|
||||
padding: 0 $code-lineno-spacing 0 $code-lineno-spacing;
|
||||
@include var(color, code-lineno-color);
|
||||
border-right: $standard-border;
|
||||
|
||||
// Even though only highlighted line table numbers get the 'star',
|
||||
// insert a corresponding space on non-highlighted ones to keep
|
||||
// spacing consistent.
|
||||
&::before {
|
||||
content: " ";
|
||||
}
|
||||
}
|
||||
|
||||
.hl {
|
||||
display: block;
|
||||
@include var(background-color, code-highlight-color);
|
||||
|
||||
.lnt::before {
|
||||
content: "*";
|
||||
.lnt {
|
||||
border-left-color: $border-color;
|
||||
&::before {
|
||||
content: "*";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user