Skip to content

Commit c3dacc5

Browse files
ronnyrinValentinH
authored andcommitted
add grunt task that copies the final css to scss file (#449)
1 parent 95f671e commit c3dacc5

File tree

3 files changed

+301
-1
lines changed

3 files changed

+301
-1
lines changed

Gruntfile.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ module.exports = function(grunt) {
147147
configFile: 'karma.conf.js',
148148
singleRun: true
149149
}
150+
},
151+
152+
copy: {
153+
copyToSass: {
154+
files: [
155+
{expand: false, src: ['dist/rzslider.css'], dest: 'dist/rzslider.scss'},
156+
]
157+
}
150158
}
151159
});
152160

@@ -159,10 +167,11 @@ module.exports = function(grunt) {
159167
grunt.loadNpmTasks('grunt-contrib-watch');
160168
grunt.loadNpmTasks('grunt-serve');
161169
grunt.loadNpmTasks('grunt-karma');
170+
grunt.loadNpmTasks('grunt-contrib-copy');
162171

163172
grunt.registerTask('default', ['css', 'js']);
164173
grunt.registerTask('test', ['karma']);
165174

166-
grunt.registerTask('css', ['recess','concat:css']);
175+
grunt.registerTask('css', ['recess','concat:css', 'copy:copyToSass']);
167176
grunt.registerTask('js', ['ngtemplates', 'replace','concat:js', 'ngAnnotate', 'uglify']);
168177
};

dist/rzslider.scss

Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
/*! angularjs-slider - v5.8.1 -
2+
(c) Rafal Zajac <[email protected]>, Valentin Hervieu <[email protected]>, Jussi Saarivirta <[email protected]>, Angelin Sirbu <[email protected]> -
3+
https://github.com/angular-slider/angularjs-slider -
4+
2016-11-03 */
5+
.rzslider {
6+
position: relative;
7+
display: inline-block;
8+
width: 100%;
9+
height: 4px;
10+
margin: 35px 0 15px 0;
11+
vertical-align: middle;
12+
-webkit-user-select: none;
13+
-moz-user-select: none;
14+
-ms-user-select: none;
15+
user-select: none;
16+
}
17+
18+
.rzslider.with-legend {
19+
margin-bottom: 40px;
20+
}
21+
22+
.rzslider[disabled] {
23+
cursor: not-allowed;
24+
}
25+
26+
.rzslider[disabled] .rz-pointer {
27+
cursor: not-allowed;
28+
background-color: #d8e0f3;
29+
}
30+
31+
.rzslider[disabled] .rz-bar-wrapper.rz-draggable {
32+
cursor: not-allowed;
33+
}
34+
35+
.rzslider[disabled] .rz-bar.rz-selection {
36+
background: #8b91a2;
37+
}
38+
39+
.rzslider[disabled] .rz-ticks .rz-tick {
40+
cursor: not-allowed;
41+
}
42+
43+
.rzslider[disabled] .rz-ticks .rz-tick.rz-selected {
44+
background: #8b91a2;
45+
}
46+
47+
.rzslider span {
48+
position: absolute;
49+
display: inline-block;
50+
white-space: nowrap;
51+
}
52+
53+
.rzslider .rz-base {
54+
width: 100%;
55+
height: 100%;
56+
padding: 0;
57+
}
58+
59+
.rzslider .rz-bar-wrapper {
60+
left: 0;
61+
z-index: 1;
62+
width: 100%;
63+
height: 32px;
64+
padding-top: 16px;
65+
margin-top: -16px;
66+
box-sizing: border-box;
67+
}
68+
69+
.rzslider .rz-bar-wrapper.rz-draggable {
70+
cursor: move;
71+
}
72+
73+
.rzslider .rz-bar {
74+
left: 0;
75+
z-index: 1;
76+
width: 100%;
77+
height: 4px;
78+
background: #d8e0f3;
79+
-webkit-border-radius: 2px;
80+
-moz-border-radius: 2px;
81+
border-radius: 2px;
82+
}
83+
84+
.rzslider .rz-bar.rz-selection {
85+
z-index: 2;
86+
background: #0db9f0;
87+
-webkit-border-radius: 2px;
88+
-moz-border-radius: 2px;
89+
border-radius: 2px;
90+
}
91+
92+
.rzslider .rz-pointer {
93+
top: -14px;
94+
z-index: 3;
95+
width: 32px;
96+
height: 32px;
97+
cursor: pointer;
98+
background-color: #0db9f0;
99+
-webkit-border-radius: 16px;
100+
-moz-border-radius: 16px;
101+
border-radius: 16px;
102+
}
103+
104+
.rzslider .rz-pointer:after {
105+
position: absolute;
106+
top: 12px;
107+
left: 12px;
108+
width: 8px;
109+
height: 8px;
110+
background: #ffffff;
111+
-webkit-border-radius: 4px;
112+
-moz-border-radius: 4px;
113+
border-radius: 4px;
114+
content: '';
115+
}
116+
117+
.rzslider .rz-pointer:hover:after {
118+
background-color: #ffffff;
119+
}
120+
121+
.rzslider .rz-pointer.rz-active {
122+
z-index: 4;
123+
}
124+
125+
.rzslider .rz-pointer.rz-active:after {
126+
background-color: #451aff;
127+
}
128+
129+
.rzslider .rz-bubble {
130+
bottom: 16px;
131+
padding: 1px 3px;
132+
color: #55637d;
133+
cursor: default;
134+
}
135+
136+
.rzslider .rz-bubble.rz-selection {
137+
top: 16px;
138+
}
139+
140+
.rzslider .rz-bubble.rz-limit {
141+
color: #55637d;
142+
}
143+
144+
.rzslider .rz-bubble.rz-floor {
145+
left: 0;
146+
}
147+
148+
.rzslider .rz-bubble.rz-ceil {
149+
right: 0;
150+
}
151+
152+
.rzslider .rz-ticks {
153+
position: absolute;
154+
top: -3px;
155+
left: 0;
156+
z-index: 1;
157+
width: 100%;
158+
height: 0;
159+
margin: 0;
160+
list-style: none;
161+
box-sizing: border-box;
162+
}
163+
164+
.rzslider .rz-ticks .rz-tick {
165+
position: absolute;
166+
top: 0;
167+
left: 0;
168+
width: 10px;
169+
height: 10px;
170+
margin-left: 11px;
171+
text-align: center;
172+
cursor: pointer;
173+
background: #d8e0f3;
174+
border-radius: 50%;
175+
}
176+
177+
.rzslider .rz-ticks .rz-tick.rz-selected {
178+
background: #0db9f0;
179+
}
180+
181+
.rzslider .rz-ticks .rz-tick .rz-tick-value {
182+
position: absolute;
183+
top: -30px;
184+
transform: translate(-50%, 0);
185+
}
186+
187+
.rzslider .rz-ticks .rz-tick .rz-tick-legend {
188+
position: absolute;
189+
top: 24px;
190+
max-width: 50px;
191+
white-space: normal;
192+
transform: translate(-50%, 0);
193+
}
194+
195+
.rzslider .rz-ticks.rz-ticks-values-under .rz-tick-value {
196+
top: initial;
197+
bottom: -32px;
198+
}
199+
200+
.rzslider.rz-vertical {
201+
position: relative;
202+
width: 4px;
203+
height: 100%;
204+
padding: 0;
205+
margin: 0 20px;
206+
vertical-align: baseline;
207+
}
208+
209+
.rzslider.rz-vertical .rz-base {
210+
width: 100%;
211+
height: 100%;
212+
padding: 0;
213+
}
214+
215+
.rzslider.rz-vertical .rz-bar-wrapper {
216+
top: auto;
217+
left: 0;
218+
width: 32px;
219+
height: 100%;
220+
padding: 0 0 0 16px;
221+
margin: 0 0 0 -16px;
222+
}
223+
224+
.rzslider.rz-vertical .rz-bar {
225+
bottom: 0;
226+
left: auto;
227+
width: 4px;
228+
height: 100%;
229+
}
230+
231+
.rzslider.rz-vertical .rz-pointer {
232+
top: auto;
233+
bottom: 0;
234+
left: -14px !important;
235+
}
236+
237+
.rzslider.rz-vertical .rz-bubble {
238+
bottom: 0;
239+
left: 16px !important;
240+
margin-left: 3px;
241+
}
242+
243+
.rzslider.rz-vertical .rz-bubble.rz-selection {
244+
top: auto;
245+
left: 16px !important;
246+
}
247+
248+
.rzslider.rz-vertical .rz-bubble.rz-floor {
249+
bottom: 0;
250+
left: auto;
251+
}
252+
253+
.rzslider.rz-vertical .rz-bubble.rz-ceil {
254+
top: 0;
255+
right: auto;
256+
}
257+
258+
.rzslider.rz-vertical .rz-ticks {
259+
top: 0;
260+
left: -3px;
261+
z-index: 1;
262+
width: 0;
263+
height: 100%;
264+
}
265+
266+
.rzslider.rz-vertical .rz-ticks .rz-tick {
267+
margin-top: 11px;
268+
margin-left: auto;
269+
vertical-align: middle;
270+
}
271+
272+
.rzslider.rz-vertical .rz-ticks .rz-tick .rz-tick-value {
273+
top: initial;
274+
left: 24px;
275+
transform: translate(0, -28%);
276+
}
277+
278+
.rzslider.rz-vertical .rz-ticks .rz-tick .rz-tick-legend {
279+
top: initial;
280+
right: 24px;
281+
max-width: none;
282+
white-space: nowrap;
283+
transform: translate(0, -28%);
284+
}
285+
286+
.rzslider.rz-vertical .rz-ticks.rz-ticks-values-under .rz-tick-value {
287+
right: 24px;
288+
bottom: initial;
289+
left: initial;
290+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"grunt": "~0.4.2",
3131
"grunt-angular-templates": "^0.5.7",
3232
"grunt-contrib-concat": "^0.5.1",
33+
"grunt-contrib-copy": "^1.0.0",
3334
"grunt-contrib-mincss": "~0.3.2",
3435
"grunt-contrib-uglify": "~0.2.2",
3536
"grunt-contrib-watch": "^0.6.1",

0 commit comments

Comments
 (0)