Files
blog/sass/_code.scss
daudix a1946ae0b2 A bunch of breaking changes for no reason except for "I didn't like it"
I mean, this release has breaking changes anyway, why not break all the
stuff I wanted to break?
2024-09-14 03:37:03 +03:00

73 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: 1.25;
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;
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 accent color to text color
}
// The line numbers already provide some kind of left/right padding
&[data-linenos] {
padding: 1rem 0;
}
}