/
popover.less
121 lines (104 loc) · 2.69 KB
/
popover.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
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
.note-popover {
position: absolute;
z-index: @zindex-popover;
display: block;
// Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.
// So reset our font and text properties to avoid inheriting weird values.
font-size: 13px;
display: none;
background: @popover-bg;
border: 1px solid @popover-border-color;
border: 1px solid @popover-fallback-border-color;
&.in { display: block; }
&.top { margin-top: -3px; padding: 5 0; }
&.right { margin-left: 3px; padding: 0 5; }
&.bottom { margin-top: 3px; padding: 5 0; }
&.left { margin-left: -3px; padding: 0 5; }
}
.note-popover {
&.bottom .note-popover-arrow {
top: -11px;
left: 50%;
margin-left: -@popover-arrow-width;
border-top-width: 0;
border-bottom-color: @popover-arrow-outer-fallback-color;
border-bottom-color: @popover-arrow-outer-color;
&::after {
top: 1px;
margin-left: -10px;
content: " ";
border-top-width: 0;
border-bottom-color: #fff;
}
}
&.top .note-popover-arrow {
bottom: -11px;
left: 50%;
margin-left: -@popover-arrow-width;
border-bottom-width: 0;
border-top-color: @popover-arrow-outer-fallback-color;
border-top-color: @popover-arrow-outer-color;
&::after {
bottom: 1px;
margin-left: -10px;
content: " ";
border-bottom-width: 0;
border-top-color: #fff;
}
}
&.right .note-popover-arrow {
top: 50%;
left: -11px;
margin-top: -@popover-arrow-width;
border-left-width: 0;
border-right-color: @popover-arrow-outer-fallback-color;
border-right-color: @popover-arrow-outer-color;
&::after {
left: 1px;
margin-top: -10px;
content: " ";
border-left-width: 0;
border-right-color: #fff;
}
}
&.left .note-popover-arrow {
top: 50%;
right: -11px;
margin-top: -@popover-arrow-width;
border-right-width: 0;
border-left-color: @popover-arrow-outer-fallback-color;
border-left-color: @popover-arrow-outer-color;
&::after {
right: 1px;
margin-top: -10px;
content: " ";
border-right-width: 0;
border-left-color: #fff;
}
}
}
.note-popover-arrow {
position: absolute;
width: 0;
height: 0;
border: 11px solid transparent;
&::after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
content : " ";
border-width: 10px;
}
}
.note-popover-content {
/*max-width: @popover-max-width;*/
padding: 3px 8px;
color: @popover-color;
text-align: center;
background-color: @popover-bg;
min-width: 100px;
min-height: 30px;
}