improve default code block styling

This commit is contained in:
zyl 2024-11-08 20:18:39 -08:00
parent 566c713097
commit a485482fa7
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
2 changed files with 42 additions and 0 deletions

View file

@ -171,12 +171,26 @@ abbr {
position: relative;
.copy {
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: scroll;
}
}

View file

@ -2,3 +2,31 @@
background-color: #bbb;
padding: 8px;
}
.wd-codeblock {
position: relative;
.copy {
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: scroll;
}
}