File: copybutton.css

package info (click to toggle)
python-pyvista 0.46.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176,968 kB
  • sloc: python: 94,346; sh: 216; makefile: 70
file content (61 lines) | stat: -rw-r--r-- 1,195 bytes parent folder | download | duplicates (2)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Copy buttons */
a.copybtn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 1em;
  height: 1em;
  padding: 0.3em;
  opacity: 0.3;
  transition: opacity 0.5s;
}

div.highlight {
  position: relative;
}

.highlight:hover .copybtn {
  opacity: 1;
}

/**
 * A minimal CSS-only tooltip copied from:
 *   https://codepen.io/mildrenben/pen/rVBrpK
 *
 * To use, write HTML like the following:
 *
 * <p class="o-tooltip--left" data-tooltip="Hey">Short</p>
 */
.o-tooltip--left {
  position: relative;
}

.o-tooltip--left:after {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  content: attr(data-tooltip);
  padding: 2px;
  top: 0;
  left: 0;
  background: grey;
  font-size: 1rem;
  color: white;
  white-space: nowrap;
  z-index: 2;
  border-radius: 2px;
  transform: translateX(-102%) translateY(0);
  transition:
    opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1),
    transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
}

.o-tooltip--left:hover:after {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateX(-100%) translateY(0);
  transition:
    opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1),
    transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
}