-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinfo-tooltip.css.ts
More file actions
61 lines (56 loc) · 1.25 KB
/
info-tooltip.css.ts
File metadata and controls
61 lines (56 loc) · 1.25 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
import { style } from "@vanilla-extract/css"
import { colors } from "src/style/constants"
export const container = style({
position: "relative",
display: "inline-flex",
alignItems: "center",
marginLeft: "6px",
verticalAlign: "middle",
})
export const icon = style({
color: colors.primary,
fontSize: "14px",
transition: "color 0.2s ease",
cursor: "pointer",
selectors: {
[`${container}:hover &`]: {
color: "#333",
},
},
})
export const tooltip = style({
position: "absolute",
bottom: "120%",
left: "50%",
transform: "translateX(-50%)",
width: "240px",
padding: "10px 14px",
backgroundColor: "white",
color: "black",
borderRadius: "6px",
fontSize: "12px",
lineHeight: "1.5",
zIndex: 1000,
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
visibility: "hidden",
opacity: 0,
pointerEvents: "none",
textAlign: "left",
// CSS of the little triangle arrow at the bottom
":after": {
content: '""',
position: "absolute",
top: "100%",
left: "50%",
marginLeft: "-5px",
borderWidth: "5px",
borderStyle: "solid",
borderColor: "white transparent transparent transparent",
},
selectors: {
[`${container}:hover &`]: {
visibility: "visible",
opacity: 1,
},
},
})