Add success indicator for code block copy button

This commit is contained in:
iBug
2024-05-06 01:20:41 +08:00
parent dc965c5bbe
commit 14e3fa2b28
6 changed files with 45 additions and 4 deletions

View File

@ -613,6 +613,8 @@ pre {
position: absolute;
top: 0.6em;
right: 0.5em;
width: 1.8em;
height: 1.5em;
z-index: 1;
background: none;
border: none;
@ -637,6 +639,22 @@ pre {
z-index: 2;
}
i {
position: absolute;
top: 0.25em;
right: 0.25em;
&.copied {
opacity: 0;
}
}
&.copied i {
opacity: 0;
&.copied {
opacity: 1;
}
}
@at-root {
.no-copy & {
display: none;