74 lines
1.3 KiB
SCSS
74 lines
1.3 KiB
SCSS
// CODE
|
|
pre,
|
|
code,
|
|
kbd,
|
|
samp {
|
|
font-family: var(--font-monospace-code);
|
|
}
|
|
|
|
code:not(pre code) {
|
|
box-shadow: var(--edge-highlight);
|
|
border-radius: var(--rounded-corner-small);
|
|
background-color: var(--fg-muted-1);
|
|
padding: 0.125rem 0.375rem;
|
|
color: var(--red-fg);
|
|
font-size: 0.875em;
|
|
}
|
|
|
|
pre {
|
|
margin: 1rem 0 1rem;
|
|
box-shadow: var(--edge-highlight), var(--shadow);
|
|
border-radius: var(--rounded-corner);
|
|
background-color: var(--fg-muted-1);
|
|
padding: 1rem;
|
|
max-width: 100vw;
|
|
overflow: auto;
|
|
line-height: normal;
|
|
|
|
table {
|
|
box-shadow: none;
|
|
border-radius: 0;
|
|
background-color: transparent;
|
|
table-layout: auto;
|
|
overflow: hidden;
|
|
|
|
tr {
|
|
&:nth-child(even) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
padding: 0;
|
|
}
|
|
|
|
th {
|
|
background-color: transparent;
|
|
font-weight: normal;
|
|
}
|
|
}
|
|
}
|
|
|
|
// The line number cells
|
|
table td:nth-of-type(1) {
|
|
-webkit-user-select: none;
|
|
cursor: default;
|
|
user-select: none;
|
|
text-align: center;
|
|
}
|
|
|
|
mark {
|
|
display: block;
|
|
box-shadow: none;
|
|
border-radius: 0; // Unset code block border radius
|
|
background-color: var(--fg-muted-1);
|
|
padding: 0; // Unset mark padding
|
|
color: var(--fg-color); // Unset mark color from primary color to text color
|
|
}
|
|
|
|
// The line numbers already provide some kind of left/right padding
|
|
&[data-linenos] {
|
|
padding: 1rem 0;
|
|
}
|
|
}
|