docs: avoid showing "Copied" if copying fails (#3397)

I noticed that in denoland/fresh#3393 it looks like it's possible that
the "Copied"/Check icon will be shown even if copying to clipboard
fails.

This PR changes it so that the Check icon only shows if copy succeeds.
This commit is contained in:
Christian Svensson
2025-09-11 21:37:31 +02:00
committed by GitHub
parent 6fbe0ddcc4
commit c22c20e21f
2 changed files with 7 additions and 16 deletions
+1 -10
View File
@@ -94,16 +94,7 @@ html[data-theme="dark"] ::selection {
background-repeat: no-repeat;
}
.group:not([data-copied]) .group-not-copied {
display: block;
}
.group[data-copied] .group-not-copied {
display: none;
}
.group[data-copied] .group-copied {
display: block;
}
.group[data-copied] .group-not-copied,
.group:not([data-copied]) .group-copied {
display: none;
}