add code block styling

This commit is contained in:
zyl 2025-01-15 01:13:37 -08:00
parent bd029d7be1
commit 5f98427467
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs

View file

@ -218,3 +218,34 @@ abbr {
display: none; display: none;
} }
} }
.wd-codeblock {
position: relative;
text-indent: 0;
tab-size: 2;
.copy {
display: none;
opacity: 0;
z-index: 1;
position: absolute;
top: 0;
right: 0;
transition: opacity linear 0.1s;
&:focus {
transition: none;
opacity: 1;
}
}
&:hover .copy,
&:focus .copy {
opacity: 1;
}
& > pre {
padding: 8px;
overflow: auto;
}
}