-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathtooltip.css
More file actions
151 lines (128 loc) · 3.39 KB
/
Copy pathtooltip.css
File metadata and controls
151 lines (128 loc) · 3.39 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
:root {
--tooltip-background-color: var(--gray-10);
--tooltip-border-color: var(--gray-90);
--tooltip-text-color: var(--gray-90);
--tooltip-box-shadow: var(--drop-shadow-overlay);
--tooltip-info-background-color: var(--white);
--tooltip-info-border-color: var(--accent-primary);
--tooltip-info-text-color: var(--gray-90);
--tooltip-info-box-shadow: rgba(0, 0, 0, 0.35) 0px 0px 10px 0px;
}
/* Dark theme variables */
.cauldron--theme-dark {
--tooltip-background-color: var(--accent-medium);
--tooltip-border-color: #b3bfc6;
--tooltip-text-color: var(--white);
--tooltip-info-background-color: var(--accent-dark);
--tooltip-info-border-color: var(--accent-info);
--tooltip-info-text-color: var(--white);
}
.Tooltip {
background-color: var(--tooltip-background-color);
border: 2px solid var(--tooltip-border-color);
box-shadow: var(--tooltip-box-shadow);
color: var(--tooltip-text-color);
font-size: var(--text-size-smaller);
line-height: var(--text-size-normal);
padding: var(--space-half) var(--space-small);
border-radius: 3px;
z-index: var(--z-index-tooltip);
text-align: center;
max-width: calc(100vw - 16px);
word-break: break-word;
}
.Tooltip--hidden {
visibility: hidden;
/* Take the tooltip out of the DOM layout flow so it doesn't reserve space when hidden */
position: fixed !important;
}
.TooltipInfo {
background-color: var(--tooltip-info-background-color);
border: 2px solid var(--tooltip-info-border-color);
box-shadow: var(--tooltip-info-box-shadow);
color: var(--tooltip-info-text-color);
max-width: 12.5rem;
padding: var(--space-half);
}
/* TooltipArrow needs some dimensions to accurately calculate its positioning */
.TooltipArrow {
position: absolute;
height: 0.1px;
width: 0.1px;
}
/* Adjust position to try to center the arrow in the tooltip's border */
[class*='Tooltip--top'] .TooltipArrow {
left: 50%;
bottom: -1px;
}
[class*='Tooltip--bottom'] .TooltipArrow {
left: 50%;
top: -1px;
}
[class*='Tooltip--left'] .TooltipArrow {
top: 50%;
right: -1px;
}
[class*='Tooltip--right'] .TooltipArrow {
top: 50%;
left: 0;
}
/*
* Default tooltip arrow styles
*/
.TooltipArrow:before {
content: '';
position: absolute;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 7px solid var(--tooltip-border-color);
border-bottom: none;
transform: translateX(-50%);
transform-origin: top;
}
[class*='Tooltip--bottom'] .TooltipArrow:before {
transform: translateX(-50%) rotate(180deg);
}
[class*='Tooltip--left'] .TooltipArrow:before {
transform: rotate(-90deg) translateY(-6px);
}
[class*='Tooltip--right'] .TooltipArrow:before {
transform: rotate(90deg) translateY(100%);
}
/*
* Info tooltip arrow styles
*/
.TooltipInfo .TooltipArrow:before {
border-top-color: var(--tooltip-info-border-color);
}
/*
* "rich" tooltip with heading-like element and content
*/
.Tooltip--big {
border: 1px solid var(--field-border-color);
border-radius: 0;
padding: 0;
background: #fff;
color: var(--text-base);
width: 247px;
}
.Tooltip--big .Line {
margin: 0;
}
.TooltipHead {
background: var(--gray-20);
font-size: var(--text-size-small);
color: var(--gray-90);
padding: var(--space-small) var(--space-large);
text-align: center;
}
.TooltipContent {
background: #fff;
text-align: left;
}
.Tooltip--big ul {
margin: 10px 15px 10px 28px;
}
.Tooltip--big li {
margin: 6px 0;
}