-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatooltip.css
More file actions
176 lines (174 loc) · 5.96 KB
/
matooltip.css
File metadata and controls
176 lines (174 loc) · 5.96 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
@import url('https://fonts.googleapis.com/css?family=Roboto&subset=latin-ext');
[matooltip] {
position: relative;
}
[matooltip]:before,
[matooltip]:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
-khtml-opacity: 0;
-moz-opacity: 0;
opacity: 0;
pointer-events: none;
-webkit-transition: all 0.35s cubic-bezier(.55,0,.1,1) 0.25s;
transition: all 0.35s cubic-bezier(.55,0,.1,1) 0.25s;
bottom: 100%;
left: 50%;
position: absolute;
z-index: 10;
-webkit-transform: translate(-50%, 10px);
-ms-transform: translate(-50%, 10px);
transform: translate(-50%, 10px);
-webkit-transform-origin: top;
-ms-transform-origin: top;
transform-origin: top;
}
[matooltip]:after {
background: #eee!important;
color:#444!important;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
border-radius: 4px;
color: #fff;
content: attr(matooltip);
font-size: 14px;
padding: .5em 1em;
white-space: nowrap;
margin-bottom: 11px;
font-family: 'Roboto', tahoma;
}
[matooltip]:before {
background: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22%23eee%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658%2C0.000%20C-13.615%2C0.000%2050.938%2C0.000%2034.662%2C0.000%20C28.662%2C0.000%2023.035%2C12.002%2018.660%2C12.002%20C14.285%2C12.002%208.594%2C0.000%202.658%2C0.000%20Z%22/%3E%3C/svg%3E') no-repeat;
background-size: 100% auto;
height: 6px;
width: 18px;
content: "";
margin-bottom: 5px;
}
[matooltip]:hover:before,
[matooltip][matooltip-visible]:before,
[matooltip]:hover:after,
[matooltip][matooltip-visible]:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
-khtml-opacity: 1;
-moz-opacity: 1;
opacity: 1;
pointer-events: auto;
-webkit-transform: translate(-50%, 0);
-ms-transform: translate(-50%, 0);
transform: translate(-50%, 0);
}
[matooltip][matooltip-break]:after {
white-space: normal;
}
[matooltip-direction="down"]:before,
[matooltip-direction="down"]:after {
bottom: auto;
left: 50%;
top: 100%;
-webkit-transform: translate(-50%, -10px);
-ms-transform: translate(-50%, -10px);
transform: translate(-50%, -10px);
}
[matooltip-direction="down"]:after {
margin-top: 11px;
}
[matooltip-direction="down"]:before {
background: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22%23eee%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658%2C0.000%20C-13.615%2C0.000%2050.938%2C0.000%2034.662%2C0.000%20C28.662%2C0.000%2023.035%2C12.002%2018.660%2C12.002%20C14.285%2C12.002%208.594%2C0.000%202.658%2C0.000%20Z%22/%3E%3C/svg%3E') no-repeat;
background-size: 100% auto;
height: 6px;
width: 18px;
margin-top: 5px;
margin-bottom: 0;
}
[matooltip-direction="down"]:hover:before,
[matooltip-direction="down"][matooltip-visible]:before,
[matooltip-direction="down"]:hover:after,
[matooltip-direction="down"][matooltip-visible]:after {
-webkit-transform: translate(-50%, 0);
-ms-transform: translate(-50%, 0);
transform: translate(-50%, 0);
}
[matooltip-direction="left"]:before,
[matooltip-direction="left"]:after {
bottom: auto;
left: auto;
right: 100%;
top: 45%;
-webkit-transform: translate(10px, -50%);
-ms-transform: translate(10px, -50%);
transform: translate(10px, -50%);
}
[matooltip-direction="left"]:after {
margin-right: 11px;
}
[matooltip-direction="left"]:before {
background: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22%23eee%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658%2C0.000%20C-13.615%2C0.000%2050.938%2C0.000%2034.662%2C0.000%20C28.662%2C0.000%2023.035%2C12.002%2018.660%2C12.002%20C14.285%2C12.002%208.594%2C0.000%202.658%2C0.000%20Z%22/%3E%3C/svg%3E') no-repeat;
background-size: 100% auto;
height: 18px;
width: 8px;
margin-right: 5px;
margin-bottom: 0;
}
[matooltip-direction="left"]:hover:before,
[matooltip-direction="left"][matooltip-visible]:before,
[matooltip-direction="left"]:hover:after,
[matooltip-direction="left"][matooltip-visible]:after {
-webkit-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
transform: translate(0, -50%);
}
[matooltip-direction="right"]:before,
[matooltip-direction="right"]:after {
bottom: auto;
left: 100%;
top: 50%;
-webkit-transform: translate(-10px, -50%);
-ms-transform: translate(-10px, -50%);
transform: translate(-10px, -50%);
}
[matooltip-direction="right"]:after {
margin-left: 11px;
}
[matooltip-direction="right"]:before {
background: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22%23eee%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658%2C0.000%20C-13.615%2C0.000%2050.938%2C0.000%2034.662%2C0.000%20C28.662%2C0.000%2023.035%2C12.002%2018.660%2C12.002%20C14.285%2C12.002%208.594%2C0.000%202.658%2C0.000%20Z%22/%3E%3C/svg%3E') no-repeat;
background-size: 100% auto;
height: 18px;
width: 6px;
margin-bottom: 0;
margin-left: 5px;
}
[matooltip-direction="right"]:hover:before,
[matooltip-direction="right"][matooltip-visible]:before,
[matooltip-direction="right"]:hover:after,
[matooltip-direction="right"][matooltip-visible]:after {
-webkit-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
transform: translate(0, -50%);
}
[matooltip-size]:after {
white-space: normal;
}
[matooltip-size="small"]:after {
width: 80px;
}
[matooltip-size="medium"]:after {
width: 150px;
}
[matooltip-size="large"]:after {
width: 260px;
}
[matooltip-size="xlarge"]:after {
width: 90vw;
}
@media screen and (min-width: 768px) {
[matooltip-size="xlarge"]:after {
width: 380px;
}
}
[matooltip-size="fit"]:after {
width: 100%;
}
button[matooltip] {
overflow: visible;
}