summaryrefslogtreecommitdiffstats
path: root/asset/css/copy-to-clipboard.less
blob: 515b14803c28180887afa6d47cfc4fd70986ea5b (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
31
32
33
34
35
36
37
38
39
40
41
.clipboard-wrapper {
  position: relative;
  > .copy-to-clipboard {
    margin: 0.1em 0.1em 0 0;
    position: absolute;
    right: 0;
    top: 0;
  }

  &:hover {
    .copy-to-clipboard.active {
      opacity: 0.8;
    }
  }
}

.copy-to-clipboard {
  .appearance(none);
  border: none;
  opacity: 0;
  background: none;
  padding: 0.25em 0.5em;
  cursor: default;

  &.active {
    cursor: pointer;
    &:hover, &:focus {
      opacity: 0.8;
      color: var(--control-color, @control-color);
      outline-offset: -2px;
    }
  }
}

.copy-to-clipboard.active,
.clipboard-wrapper:hover .copy-to-clipboard.active {
  &.copied {
    opacity: 0;
    transition: opacity 1s linear 3s;
  }
}