-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtooltip.css
More file actions
101 lines (90 loc) · 2.21 KB
/
tooltip.css
File metadata and controls
101 lines (90 loc) · 2.21 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
@layer aw-components {
.aw-tooltip-wrap {
--aw-tooltip-bg: #0f172a;
--aw-tooltip-text: #fff;
--aw-tooltip-font: system-ui, -apple-system, sans-serif;
--aw-tooltip-radius: 6px;
--aw-tooltip-arrow: 6px;
position: relative;
display: inline-flex;
font-family: var(--aw-tooltip-font);
}
.aw-tooltip {
position: absolute;
z-index: 50;
padding: 0.375rem 0.625rem;
font-size: 0.75rem;
line-height: 1.4;
white-space: nowrap;
background: var(--aw-tooltip-bg);
color: var(--aw-tooltip-text);
border-radius: var(--aw-tooltip-radius);
pointer-events: none;
}
.aw-tooltip-top {
bottom: 100%;
left: 50%;
transform: translateX(-50%);
margin-bottom: var(--aw-tooltip-arrow);
}
.aw-tooltip-top::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: var(--aw-tooltip-arrow) solid transparent;
border-top-color: var(--aw-tooltip-bg);
}
.aw-tooltip-bottom {
top: 100%;
left: 50%;
transform: translateX(-50%);
margin-top: var(--aw-tooltip-arrow);
}
.aw-tooltip-bottom::after {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border: var(--aw-tooltip-arrow) solid transparent;
border-bottom-color: var(--aw-tooltip-bg);
}
.aw-tooltip-left {
right: 100%;
top: 50%;
transform: translateY(-50%);
margin-right: var(--aw-tooltip-arrow);
}
.aw-tooltip-left::after {
content: '';
position: absolute;
left: 100%;
top: 50%;
transform: translateY(-50%);
border: var(--aw-tooltip-arrow) solid transparent;
border-left-color: var(--aw-tooltip-bg);
}
.aw-tooltip-right {
left: 100%;
top: 50%;
transform: translateY(-50%);
margin-left: var(--aw-tooltip-arrow);
}
.aw-tooltip-right::after {
content: '';
position: absolute;
right: 100%;
top: 50%;
transform: translateY(-50%);
border: var(--aw-tooltip-arrow) solid transparent;
border-right-color: var(--aw-tooltip-bg);
}
@media (prefers-color-scheme: dark) {
.aw-tooltip-wrap {
--aw-tooltip-bg: #f1f5f9;
--aw-tooltip-text: #0f172a;
}
}
}