-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
tooltip.css
83 lines (74 loc) · 1.94 KB
/
tooltip.css
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.matter-tooltip,
.matter-tooltip-top {
z-index: 10;
position: absolute;
left: 0;
right: 0;
font-family: var(--matter-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);
font-size: 10px;
font-weight: 400;
line-height: 16px;
white-space: nowrap;
text-transform: none;
text-align: center;
pointer-events: none;
}
.matter-tooltip {
bottom: -40px;
}
.matter-tooltip-top {
top: -40px;
}
.matter-tooltip > span,
.matter-tooltip-top > span {
position: -webkit-sticky;
position: sticky;
left: 0;
right: 0;
display: inline-block;
box-sizing: content-box;
margin: 0 -100vw;
border: solid 8px transparent;
border-radius: 12px;
padding: 4px 8px;
color: rgb(var(--matter-surface-rgb, 255, 255, 255));
background-clip: padding-box;
background-image: linear-gradient(rgba(var(--matter-surface-rgb, 255, 255, 255), 0.34), rgba(var(--matter-surface-rgb, 255, 255, 255), 0.34));
background-color: rgba(var(--matter-onsurface-rgb, 0, 0, 0), 0.85);
transform: scale(0);
opacity: 0;
pointer-events: auto;
transition: transform 0.075s, opacity 0.075s;
}
:not(html):hover > .matter-tooltip > span,
.matter-tooltip:hover > span,
:not(html):hover > .matter-tooltip-top > span,
.matter-tooltip-top:hover > span {
transform: scale(1);
opacity: 1;
transition: transform 0.15s, opacity 0.15s;
}
:focus-within > .matter-tooltip > span,
:focus-within > .matter-tooltip-top > span {
transform: scale(1);
opacity: 1;
transition: transform 0.15s, opacity 0.15s;
}
/* Non-desktop */
@media (pointer: coarse), (hover: none) {
.matter-tooltip,
.matter-tooltip-top {
font-size: 14px;
line-height: 20px;
}
.matter-tooltip {
bottom: -48px;
}
.matter-tooltip-top {
top: -48px;
}
.matter-tooltip > span,
.matter-tooltip-top > span {
padding: 6px 16px;
}
}