Skip to content

Commit 9216309

Browse files
authored
fix(ui): fix transparency bleeding of copied tooltip (#1913)
1 parent 94f95fa commit 9216309

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/components/CopyToClipboardButton.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function handleClick() {
3737
class="absolute z-20 inset-is-0 top-full inline-flex items-center gap-1 px-2 py-1 rounded border text-xs font-mono whitespace-nowrap transition-all duration-150 opacity-0 -translate-y-1 pointer-events-none group-hover:opacity-100 group-hover:translate-y-0 group-hover:pointer-events-auto focus-visible:opacity-100 focus-visible:translate-y-0 focus-visible:pointer-events-auto"
3838
:class="[
3939
$style.copyButton,
40-
copied ? 'text-accent bg-accent/10' : 'text-fg-muted bg-bg border-border',
40+
copied ? ['text-accent', $style.copiedBg] : 'text-fg-muted bg-bg border-border',
4141
]"
4242
:aria-label="copied ? buttonAriaLabelCopied : buttonAriaLabelCopy"
4343
v-bind="buttonAttrs"
@@ -80,6 +80,10 @@ function handleClick() {
8080
translate 0.15s;
8181
}
8282
83+
.copiedBg {
84+
background-color: color-mix(in srgb, var(--accent) 10%, var(--bg));
85+
}
86+
8387
@media (hover: none) {
8488
.copyButton {
8589
display: none;

0 commit comments

Comments
 (0)