forked from mbtaviz/mbtaviz.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd3tip.less
75 lines (68 loc) · 1.21 KB
/
d3tip.less
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
/**
* d3tip.less
*
* Copyright 2014 Michael Barry & Brian Card. MIT open-source lincense.
*
* D3-tip styles
*/
.d3-tip {
line-height: 1;
font-weight: bold;
padding: 10px;
background: rgba(0, 0, 0, 0.8);
font-family: Arial, sans-serif;
color: #fff;
border-radius: 2px;
pointer-events: none;
font-size: 10px;
text-align: left;
z-index: 99;
&.pick2.out {
.transition(opacity 0s 100ms);
}
}
.d3-tip.text-center {
text-align: center;
}
/* Creates a small triangle extender for the tooltip */
.d3-tip:after {
.box-sizing(border-box);
text-align: left;
display: inline;
font-size: 15px;
width: 100%;
line-height: 1;
color: rgba(0, 0, 0, 0.8);
position: absolute;
pointer-events: none;
}
/* Northward tooltips */
.d3-tip.n:after {
content: "\25BC";
margin: -3px 0 0 0;
top: 100%;
left: 0;
text-align: center;
}
/* Eastward tooltips */
.d3-tip.e:after {
content: "\25C0";
margin: -6px 0 0 0;
top: 50%;
left: -12px;
}
/* Southward tooltips */
.d3-tip.s:after {
content: "\25B2";
margin: 0 0 1px 0;
top: -8px;
left: 0;
text-align: center;
}
/* Westward tooltips */
.d3-tip.w:after {
content: "\25B6";
margin: -4px 0 0 -2px;
top: 50%;
left: 100%;
}