Some initial sass refactoring (breaking change!)
Well, it's not a breaking change if you don't restyle duckquill heavily :)
This commit is contained in:
64
sass/_code.scss
Normal file
64
sass/_code.scss
Normal file
@ -0,0 +1,64 @@
|
||||
// CODE
|
||||
pre,
|
||||
code,
|
||||
kbd {
|
||||
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-2);
|
||||
padding: 0.125rem 0.375rem;
|
||||
color: var(--red-fg);
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 1rem 0 1rem;
|
||||
box-shadow: var(--edge-highlight), var(--shadow);
|
||||
border-radius: var(--rounded-corner);
|
||||
padding: 1rem;
|
||||
max-width: 100vw;
|
||||
overflow: auto;
|
||||
line-height: normal;
|
||||
|
||||
table td {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
// The line number cells
|
||||
table td:nth-of-type(1) {
|
||||
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
|
||||
}
|
||||
|
||||
table {
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
table-layout: auto;
|
||||
overflow: auto;
|
||||
|
||||
tr {
|
||||
&:nth-child(even) {
|
||||
background-color: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The line numbers already provide some kind of left/right padding
|
||||
&[data-linenos] {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user