Skip to content

Commit ba7584c

Browse files
committed
Added clean tooltips, based off mac tooltip design
1 parent d120e2f commit ba7584c

File tree

6 files changed

+464
-0
lines changed

6 files changed

+464
-0
lines changed
663 Bytes
Loading
648 Bytes
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
Template::addGlobalStyle("tooltip.css");
3+
Template::addGlobalScript("tooltip.js");
4+
?>

Enhancements/Clean Tooltips/info.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Clean Tooltips",
3+
"provides": "tooltips"
4+
}
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
tooltip {
2+
z-index: 700;
3+
position: absolute;
4+
text-align: center;
5+
pointer-events: none;
6+
display: block;
7+
}
8+
9+
tooltip > content {
10+
display: block;
11+
background-color: white;
12+
-webkit-box-shadow: 0 0 4px 0 rgba(0,0,0,0.4);
13+
box-shadow: 0 0 4px 0 rgba(0,0,0,0.4);
14+
border-radius: 4px;
15+
text-align: center;
16+
overflow: hidden;
17+
max-width: 300px;
18+
font-size: 14px;
19+
padding: 12px;
20+
color: #444;
21+
}
22+
23+
tooltip > content h1 {
24+
margin: 0px;
25+
font-size: 120%;
26+
text-align: center;
27+
padding-bottom: 2px;
28+
border-bottom: solid 1pt #eaeaea;
29+
margin-bottom: 2px;
30+
}
31+
32+
tooltip > content h2 {
33+
margin: 0px;
34+
font-size: 12px;
35+
text-transform: uppercase;
36+
text-decoration: none;
37+
margin-bottom: 15px;
38+
color: #adadad;
39+
}
40+
41+
tooltip.interactive {
42+
pointer-events: auto;
43+
}
44+
45+
tooltip.interactive > content {
46+
text-align: left;
47+
padding: 22px;
48+
}
49+
50+
tooltip.interactive > content a {
51+
display: block;
52+
cursor: pointer;
53+
font-size: 14px;
54+
text-decoration: none;
55+
margin: 10px 0px;
56+
color: #45494a;
57+
}
58+
59+
tooltip.interactive > content a:last-child {
60+
margin-bottom: 0px;
61+
}
62+
63+
tooltip.interactive > hr {
64+
height: 0px;
65+
border: none;
66+
border-bottom: solid 1pt #e8e8e8;
67+
border-top: solid 1pt #f1f1f1;
68+
}
69+
70+
tooltip > arrow {
71+
width: 34px;
72+
height: 20px;
73+
z-index: 500;
74+
position: relative;
75+
background: url({{/arrow-down.png}}) no-repeat;
76+
display: inline-block;
77+
top: -2px;
78+
}
79+
80+
tooltip > arrow.flip {
81+
display: none;
82+
top: 3px;
83+
}
84+
85+
tooltip.flipped > arrow {
86+
display: none;
87+
}
88+
89+
tooltip.flipped > arrow.flip {
90+
display: inline-block;
91+
background: url({{/arrow-up.png}}) no-repeat;
92+
top: 3px;
93+
}
94+
95+
tooltip label {
96+
display: block;
97+
font-size: 80%;
98+
margin-top: 8px;
99+
}
100+
101+
tooltip working,
102+
tooltip writing,
103+
tooltip waiting,
104+
tooltip information,
105+
tooltip warning,
106+
tooltip error {
107+
display: block;
108+
font-size: 90%;
109+
color: #777;
110+
}
111+
112+
tooltip working::before,
113+
tooltip writing::before,
114+
tooltip waiting::before,
115+
tooltip information::before,
116+
tooltip warning::before,
117+
tooltip error::before {
118+
margin-right: 6px;
119+
font-family: "FontAwesome";
120+
display: inline-block;
121+
}
122+
123+
tooltip working::before {
124+
animation: spin 4s infinite linear;
125+
-moz-animation: spin 4s infinite linear;
126+
-webkit-animation: spin 4s infinite linear;
127+
content: "\f013";
128+
}
129+
130+
tooltip information::before {
131+
content: "\f129";
132+
}
133+
134+
tooltip waiting {
135+
opacity: 0.4;
136+
}
137+
138+
tooltip waiting::before {
139+
content: "\f04c";
140+
}
141+
142+
tooltip writing::before {
143+
content: "\f040";
144+
}
145+
146+
tooltip warning {
147+
color: #bca21e;
148+
}
149+
150+
tooltip warning::before {
151+
content: "\f071";
152+
}
153+
154+
tooltip error {
155+
color: #c92222;
156+
}
157+
158+
tooltip error::before {
159+
content: "\f056";
160+
}
161+
162+
@-moz-keyframes spin {
163+
from { -moz-transform: rotate(0deg); }
164+
to { -moz-transform: rotate(360deg); }
165+
}
166+
@-webkit-keyframes spin {
167+
from { -webkit-transform: rotate(0deg); }
168+
to { -webkit-transform: rotate(360deg); }
169+
}
170+
@keyframes spin {
171+
from {transform:rotate(0deg);}
172+
to {transform:rotate(360deg);}
173+
}
174+

0 commit comments

Comments
 (0)