Refactor sass
Browse files- src/driver.scss +43 -29
src/driver.scss
CHANGED
@@ -1,24 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
div#driver-popover-item {
|
2 |
display: none;
|
3 |
position: absolute;
|
4 |
-
background:
|
5 |
-
color:
|
6 |
margin: 0;
|
7 |
padding: 15px;
|
8 |
border-radius: 5px;
|
9 |
min-width: 250px;
|
10 |
max-width: 300px;
|
11 |
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
|
12 |
-
z-index:
|
13 |
|
14 |
.driver-popover-tip {
|
15 |
-
border: 5px solid
|
16 |
content: '';
|
17 |
position: absolute;
|
18 |
|
19 |
&.bottom {
|
20 |
bottom: -10px;
|
21 |
-
border-top-color:
|
22 |
border-right-color: transparent;
|
23 |
border-bottom-color: transparent;
|
24 |
border-left-color: transparent;
|
@@ -28,7 +44,7 @@ div#driver-popover-item {
|
|
28 |
left: -10px;
|
29 |
top: 10px;
|
30 |
border-top-color: transparent;
|
31 |
-
border-right-color:
|
32 |
border-bottom-color: transparent;
|
33 |
border-left-color: transparent;
|
34 |
}
|
@@ -39,14 +55,14 @@ div#driver-popover-item {
|
|
39 |
border-top-color: transparent;
|
40 |
border-right-color: transparent;
|
41 |
border-bottom-color: transparent;
|
42 |
-
border-left-color:
|
43 |
}
|
44 |
|
45 |
&.top {
|
46 |
top: -10px;
|
47 |
border-top-color: transparent;
|
48 |
border-right-color: transparent;
|
49 |
-
border-bottom-color:
|
50 |
border-left-color: transparent;
|
51 |
}
|
52 |
}
|
@@ -62,18 +78,18 @@ div#driver-popover-item {
|
|
62 |
border: 1px solid #d4d4d4;
|
63 |
text-decoration: none;
|
64 |
text-shadow: 1px 1px 0 #fff;
|
65 |
-
color:
|
66 |
font: 11px/normal sans-serif;
|
67 |
cursor: pointer;
|
68 |
outline: 0;
|
69 |
-
background-color:
|
70 |
border-radius: 2px;
|
71 |
zoom: 1;
|
72 |
margin: 10px 0 0;
|
73 |
}
|
74 |
|
75 |
button.driver-disabled {
|
76 |
-
color:
|
77 |
cursor: default;
|
78 |
pointer-events: none;
|
79 |
}
|
@@ -101,7 +117,7 @@ div#driver-popover-item {
|
|
101 |
margin-bottom: 0;
|
102 |
font: 14px/normal sans-serif;
|
103 |
line-height: 1.5;
|
104 |
-
color:
|
105 |
font-weight: normal;
|
106 |
zoom: 1;
|
107 |
}
|
@@ -128,14 +144,13 @@ div#driver-page-overlay {
|
|
128 |
zoom: 1;
|
129 |
filter: alpha(opacity=75);
|
130 |
opacity: 0.75;
|
131 |
-
z-index:
|
132 |
-
|
133 |
-
|
134 |
-
-
|
135 |
-
-
|
136 |
-
-
|
137 |
-
|
138 |
-
transition: all 0.4s;
|
139 |
}
|
140 |
|
141 |
div#driver-highlighted-element-stage {
|
@@ -144,19 +159,18 @@ div#driver-highlighted-element-stage {
|
|
144 |
left: 0;
|
145 |
height: 50px;
|
146 |
width: 300px;
|
147 |
-
background:
|
148 |
-
z-index:
|
149 |
display: none;
|
150 |
|
151 |
-
|
152 |
-
-
|
153 |
-
-
|
154 |
-
-
|
155 |
-
|
156 |
-
transition: all 0.4s;
|
157 |
}
|
158 |
|
159 |
.driver-highlighted-element {
|
160 |
-
z-index:
|
161 |
position: relative;
|
162 |
}
|
|
|
1 |
+
$text-color: #2d2d2d;
|
2 |
+
$popover-bg: #ffffff;
|
3 |
+
$stage-bg: #ffffff;
|
4 |
+
$button-bg: #f1f1f1;
|
5 |
+
$disabled-btn-color: #808080;
|
6 |
+
|
7 |
+
$popover-zindex: 1000000000;
|
8 |
+
$overlay-zindex: 100002;
|
9 |
+
$stage-zindex: 100003;
|
10 |
+
$highlighted-element-zindex: 100004;
|
11 |
+
|
12 |
+
// If you update this duration, make sure to
|
13 |
+
// update `ANIMATION_DURATION_MS` constant
|
14 |
+
$animation-ms: 400;
|
15 |
+
$animation-sec: ($animation-ms / 1000) * 1s;
|
16 |
+
|
17 |
div#driver-popover-item {
|
18 |
display: none;
|
19 |
position: absolute;
|
20 |
+
background: $popover-bg;
|
21 |
+
color: $text-color;
|
22 |
margin: 0;
|
23 |
padding: 15px;
|
24 |
border-radius: 5px;
|
25 |
min-width: 250px;
|
26 |
max-width: 300px;
|
27 |
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
|
28 |
+
z-index: $popover-zindex;
|
29 |
|
30 |
.driver-popover-tip {
|
31 |
+
border: 5px solid $popover-bg;
|
32 |
content: '';
|
33 |
position: absolute;
|
34 |
|
35 |
&.bottom {
|
36 |
bottom: -10px;
|
37 |
+
border-top-color: $popover-bg;
|
38 |
border-right-color: transparent;
|
39 |
border-bottom-color: transparent;
|
40 |
border-left-color: transparent;
|
|
|
44 |
left: -10px;
|
45 |
top: 10px;
|
46 |
border-top-color: transparent;
|
47 |
+
border-right-color: $popover-bg;
|
48 |
border-bottom-color: transparent;
|
49 |
border-left-color: transparent;
|
50 |
}
|
|
|
55 |
border-top-color: transparent;
|
56 |
border-right-color: transparent;
|
57 |
border-bottom-color: transparent;
|
58 |
+
border-left-color: $popover-bg;
|
59 |
}
|
60 |
|
61 |
&.top {
|
62 |
top: -10px;
|
63 |
border-top-color: transparent;
|
64 |
border-right-color: transparent;
|
65 |
+
border-bottom-color: $popover-bg;
|
66 |
border-left-color: transparent;
|
67 |
}
|
68 |
}
|
|
|
78 |
border: 1px solid #d4d4d4;
|
79 |
text-decoration: none;
|
80 |
text-shadow: 1px 1px 0 #fff;
|
81 |
+
color: $text-color;
|
82 |
font: 11px/normal sans-serif;
|
83 |
cursor: pointer;
|
84 |
outline: 0;
|
85 |
+
background-color: $button-bg;
|
86 |
border-radius: 2px;
|
87 |
zoom: 1;
|
88 |
margin: 10px 0 0;
|
89 |
}
|
90 |
|
91 |
button.driver-disabled {
|
92 |
+
color: $disabled-btn-color;
|
93 |
cursor: default;
|
94 |
pointer-events: none;
|
95 |
}
|
|
|
117 |
margin-bottom: 0;
|
118 |
font: 14px/normal sans-serif;
|
119 |
line-height: 1.5;
|
120 |
+
color: $text-color;
|
121 |
font-weight: normal;
|
122 |
zoom: 1;
|
123 |
}
|
|
|
144 |
zoom: 1;
|
145 |
filter: alpha(opacity=75);
|
146 |
opacity: 0.75;
|
147 |
+
z-index: $overlay-zindex !important;
|
148 |
+
|
149 |
+
-webkit-transition: all $animation-sec;
|
150 |
+
-moz-transition: all $animation-sec;
|
151 |
+
-ms-transition: all $animation-sec;
|
152 |
+
-o-transition: all $animation-sec;
|
153 |
+
transition: all $animation-sec;
|
|
|
154 |
}
|
155 |
|
156 |
div#driver-highlighted-element-stage {
|
|
|
159 |
left: 0;
|
160 |
height: 50px;
|
161 |
width: 300px;
|
162 |
+
background: $stage-bg;
|
163 |
+
z-index: $stage-zindex !important;
|
164 |
display: none;
|
165 |
|
166 |
+
-webkit-transition: all $animation-sec;
|
167 |
+
-moz-transition: all $animation-sec;
|
168 |
+
-ms-transition: all $animation-sec;
|
169 |
+
-o-transition: all $animation-sec;
|
170 |
+
transition: all $animation-sec;
|
|
|
171 |
}
|
172 |
|
173 |
.driver-highlighted-element {
|
174 |
+
z-index: $highlighted-element-zindex !important;
|
175 |
position: relative;
|
176 |
}
|