summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/components/share/copy-button.module.css
blob: 31013fc08fd6df30b7807df4d58a3b22557b868e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.root {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;

  button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.125rem;
    color: var(--sl-color-text-secondary);

    svg {
      display: block;
      width: 1rem;
      height: 1rem;
    }

    &[data-copied="true"] {
      color: var(--sl-color-green-high);
    }
  }
}

/* Show copy button when parent is hovered */
*:hover > .root {
  opacity: 1;
  visibility: visible;
}