Try fixing copy button flying out

This commit is contained in:
iBug
2024-05-06 21:06:32 +08:00
parent 14e3fa2b28
commit 4f76c2546a
5 changed files with 50 additions and 6 deletions

View File

@ -139,6 +139,10 @@ body {
}
}
pre {
position: relative;
}
:not(pre) > code {
padding-top: 0.1rem;
padding-bottom: 0.1rem;

View File

@ -608,6 +608,10 @@ a.reversefootnote {
}
pre {
&.highlight .clipboard-copy-button {
color: #ffffca;
}
.clipboard-copy-button {
display: block;
position: absolute;
@ -621,14 +625,9 @@ pre {
outline: none;
border-radius: 0.1em;
padding: 0.2em 0.5em;
color: white;
opacity: 0.4;
transition: color 0.25s linear -0.25s, opacity 0.25s linear;
&:hover {
color: #ffffca;
}
&::before {
content: '';
position: absolute;