-
Notifications
You must be signed in to change notification settings - Fork 346
/
tooltip.css
76 lines (65 loc) · 1.64 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
:host {
--tooltip-max-width: 232px;
--tooltip-width: auto;
/**
* Set this to inline if the wrapped content should also be rendered as
* inline, such as when applying a tooltip to a sentence span as part of
* a larger paragraph.
*
* TODO(lit-dev): see if we can use inline for this always? May cause issues
* with tooltip positioning.
*/
--anchor-display-mode: inline-block;
--tooltip-position-left: auto;
--tooltip-position-right: auto;
--tooltip-position-top: auto;
--tooltip-position-bottom: auto;
}
/* Tooltip */
.lit-tooltip {
display: var(--anchor-display-mode);
}
/* Tooltip text */
.lit-tooltip .tooltip-text {
max-width: var(--tooltip-max-width);
width: var(--tooltip-width);
background-color: #202124;
opacity: 0.9;
border-radius: 4px;
color: #fff;
padding: 0px 8px;
position: absolute;
z-index: 9999;
white-space: normal;
font-size: 12px;
font-weight: normal;
line-height: 16px;
left: var(--tooltip-position-left);
right: var(--tooltip-position-right);
top: var(--tooltip-position-top);
bottom: var(--tooltip-position-bottom);
display: -webkit-box;
-webkit-line-clamp: 6;
-webkit-box-orient: vertical;
overflow: hidden;
}
.tooltip-text.above {
bottom: 28px;
}
.tooltip-text.left {
right: 12px;
}
.lit-tooltip .tooltip-text a {
color: #7bcccc;
}
/* Show the tooltip text when you mouse over the tooltip container */
.lit-tooltip:hover .tooltip-text:not(.disabled) {
visibility: visible;
}
.lit-tooltip .tooltip-text:not(.force-show) {
visibility: hidden;
}
/* Show the tooltip when forceShow is set. */
.lit-tooltip .tooltip-text.force-show {
visibility: visible;
}