ezy 0.2.7.alpha → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/VERSION +1 -1
- data/ezy.gemspec +1 -1
- data/sass/ezy/_sprites.scss +76 -25
- data/test/css/sprites/layout.css +2 -2
- data/test/css/sprites/position.css +4 -4
- data/test/css/sprites/repeat.css +2 -2
- data/test/css/sprites/resolution.css +2 -2
- data/test/css/sprites/responsive.css +69 -0
- data/test/css/sprites/retina.css +2 -2
- data/test/css/sprites/simple.css +1 -1
- data/test/css/sprites/spacing.css +2 -2
- data/test/html/sprites/responsive.html +19 -0
- data/test/scss/sprites/responsive.scss +52 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fbb1478ff648abae2c74dd31938c81a46aa971d
|
4
|
+
data.tar.gz: 2445d1f5deb200bfd89aeac4b7ee7a63709037ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 360c21aa75455dcf10efa73e768bd4dd2029abf0c96c60404b8eaadf6ca505253ef10d23c6e57bf5505a2984e0301cca73a97471c6a70e4da80b6678f2b9877d
|
7
|
+
data.tar.gz: 7cae818ad5155811560709912ee1424d7f050e48cdc8181203fa1f6260e4430f7271a13f74bccc5d099b0b17db524674586be36b50590917d6d4202bc274d764
|
data/README.md
CHANGED
@@ -11,8 +11,8 @@ Ezy so far contains:
|
|
11
11
|
|
12
12
|
View all documentation here: [raahede.github.io/ezy](http://raahede.github.io/ezy/)
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
Documentation
|
15
|
+
-------------
|
16
16
|
|
17
17
|
#### 1) Install the gem
|
18
18
|
|
@@ -59,4 +59,3 @@ If you've cloned my project and want to test your code with a local gem.
|
|
59
59
|
#### Install local gem ###
|
60
60
|
`gem install --local ezy-[build version].gem`
|
61
61
|
|
62
|
-
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.8
|
data/ezy.gemspec
CHANGED
data/sass/ezy/_sprites.scss
CHANGED
@@ -9,9 +9,10 @@
|
|
9
9
|
// https://github.com/chriseppstein/compass/issues/897
|
10
10
|
|
11
11
|
// ---------------------------------------------------------------------------
|
12
|
-
//
|
12
|
+
// Setting defaults
|
13
13
|
|
14
14
|
$min-device-pixel-ratio: 2 !default;
|
15
|
+
$legacy-selector: ".no-media-queries" !default;
|
15
16
|
|
16
17
|
// ---------------------------------------------------------------------------
|
17
18
|
// Sprite map store
|
@@ -160,18 +161,34 @@ $sprite-maps: ();
|
|
160
161
|
//
|
161
162
|
// Retina media query mixin
|
162
163
|
|
163
|
-
@mixin at-retina( $ratio: 2 ) {
|
164
|
-
@
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
164
|
+
@mixin at-retina( $ratio: 2, $query: false ) {
|
165
|
+
@if $query {
|
166
|
+
// Extending retina media query with breakpoint query
|
167
|
+
@media
|
168
|
+
only screen and (-webkit-min-device-pixel-ratio: #{ $ratio }) and #{ $query },
|
169
|
+
only screen and ( min--moz-device-pixel-ratio: #{ $ratio }) and #{ $query },
|
170
|
+
only screen and ( -moz-min-device-pixel-ratio: #{ $ratio }) and #{ $query },
|
171
|
+
only screen and ( -ms-min-device-pixel-ratio: #{ $ratio }) and #{ $query },
|
172
|
+
only screen and ( -o-min-device-pixel-ratio: #{ $ratio }/1) and #{ $query },
|
173
|
+
only screen and ( min-device-pixel-ratio: #{ $ratio }) and #{ $query },
|
174
|
+
only screen and ( min-resolution: #{ $ratio * 96 }dpi) and #{ $query },
|
175
|
+
only screen and ( min-resolution: #{ $ratio }dppx) and #{ $query } {
|
176
|
+
@content;
|
177
|
+
}
|
178
|
+
} @else {
|
179
|
+
@media
|
180
|
+
only screen and (-webkit-min-device-pixel-ratio: #{ $ratio }),
|
181
|
+
only screen and ( min--moz-device-pixel-ratio: #{ $ratio }),
|
182
|
+
only screen and ( -moz-min-device-pixel-ratio: #{ $ratio }),
|
183
|
+
only screen and ( -ms-min-device-pixel-ratio: #{ $ratio }),
|
184
|
+
only screen and ( -o-min-device-pixel-ratio: #{ $ratio }/1),
|
185
|
+
only screen and ( min-device-pixel-ratio: #{ $ratio }),
|
186
|
+
only screen and ( min-resolution: #{ $ratio * 96 }dpi),
|
187
|
+
only screen and ( min-resolution: #{ $ratio }dppx) {
|
188
|
+
@content;
|
189
|
+
}
|
174
190
|
}
|
191
|
+
|
175
192
|
}
|
176
193
|
|
177
194
|
// ---------------------------------------------------------------------------
|
@@ -227,7 +244,6 @@ $sprite-maps: ();
|
|
227
244
|
%sprite-placeholder-#{ $name } {
|
228
245
|
background-image: sprite-url( $sprite );
|
229
246
|
background-repeat: $repeat;
|
230
|
-
// background-position-x: $position;
|
231
247
|
}
|
232
248
|
%sprite-placeholder-#{ $name }-retina {
|
233
249
|
@if $sprite-retina {
|
@@ -238,9 +254,6 @@ $sprite-maps: ();
|
|
238
254
|
@if $repeat-retina != $repeat {
|
239
255
|
background-repeat: $repeat-retina;
|
240
256
|
}
|
241
|
-
// @if $position-retina != $position {
|
242
|
-
// background-position-x: $position-retina;
|
243
|
-
// }
|
244
257
|
}
|
245
258
|
}
|
246
259
|
}
|
@@ -259,7 +272,9 @@ $sprite-maps: ();
|
|
259
272
|
$offset-y: 0, // background offset y (optional)
|
260
273
|
$use-retina: true, // wether to use retina on hi-res screens (optional)
|
261
274
|
$offset-x-retina: null, // background offset x on retina (optional)
|
262
|
-
$offset-y-retina: null
|
275
|
+
$offset-y-retina: null, // background offset y on retina (optional)
|
276
|
+
$at-breakpoint: false, // media query
|
277
|
+
$legacy-support: false // fallback for media query
|
263
278
|
) {
|
264
279
|
|
265
280
|
@if $offset-x-retina == null { $offset-x-retina: $offset-x; }
|
@@ -271,27 +286,63 @@ $sprite-maps: ();
|
|
271
286
|
$retina-map: return-sprite-map( $name, $retina: true );
|
272
287
|
}
|
273
288
|
|
289
|
+
// Catching media breakpoints from set-breakpoint
|
290
|
+
@if type-of( $at-breakpoint ) == "list" {
|
291
|
+
@if ( not $legacy-support ) and length( $at-breakpoint ) > 1 {
|
292
|
+
// Inheriting legacy support setting from set-breakpoint
|
293
|
+
$legacy-support: nth( $at-breakpoint, 2 );
|
294
|
+
}
|
295
|
+
$at-breakpoint: nth( $at-breakpoint, 1 );
|
296
|
+
}
|
297
|
+
|
274
298
|
@if $map and $image {
|
275
299
|
$pos: sprite-position($map, $image);
|
276
300
|
$pos-x: return-offset( nth( $pos, 1 ), $offset-x, "$offset-x must be a number, a pixel value or a percentage!" );
|
277
301
|
$pos-y: return-offset( nth( $pos, 2 ), $offset-y, "$offset-y must be a number, a pixel value or a percentage!" );
|
278
|
-
|
302
|
+
|
303
|
+
@if $at-breakpoint {
|
304
|
+
@media #{ $at-breakpoint } {
|
305
|
+
background-position: $pos-x $pos-y;
|
306
|
+
// Settings that would usually be set by extending %sprite-placeholder-#{ $name }
|
307
|
+
// @extend is not possible from within a media query
|
308
|
+
background-image: sprite-url( $map );
|
309
|
+
background-repeat: return-sprite-setting( $name, 6 );
|
310
|
+
}
|
311
|
+
} @else {
|
312
|
+
background-position: $pos-x $pos-y;
|
313
|
+
@extend %sprite-placeholder-#{ $name };
|
314
|
+
}
|
315
|
+
|
316
|
+
@if $legacy-support {
|
317
|
+
#{ $legacy-selector } & {
|
318
|
+
background-position: $pos-x $pos-y;
|
319
|
+
@extend %sprite-placeholder-#{ $name };
|
320
|
+
}
|
321
|
+
}
|
322
|
+
|
279
323
|
@if $retina-map {
|
280
|
-
@include at-retina( $min-device-pixel-ratio ) {
|
324
|
+
@include at-retina( $min-device-pixel-ratio, $at-breakpoint ) {
|
281
325
|
/* Retina sprite */
|
282
326
|
$pos: sprite-position($retina-map, $image);
|
283
327
|
$pos-x: return-offset( nth( $pos, 1 )/2, $offset-x-retina, "$offset-x-retina must be a number, a pixel value or a percentage!" );
|
284
328
|
$pos-y: return-offset( nth( $pos, 2 )/2, $offset-y-retina, "$offset-y-retina must be a number, a pixel value or a percentage!" );
|
285
329
|
background-position: $pos-x $pos-y;
|
330
|
+
@if $at-breakpoint {
|
331
|
+
// Settings that would usually be set by extending %sprite-placeholder-#{ $name }
|
332
|
+
// @extend is not possible from within a media query
|
333
|
+
background-image: sprite-url( $retina-map );
|
334
|
+
background-size: image-width( sprite-path( $retina-map ) )/2 auto;
|
335
|
+
@if return-sprite-setting( $name, 7 ) != return-sprite-setting( $name, 6 ) {
|
336
|
+
background-repeat: return-sprite-setting( $name, 7 );
|
337
|
+
}
|
338
|
+
}
|
339
|
+
}
|
340
|
+
@if ( not $at-breakpoint ) {
|
341
|
+
// Set to optional because placeholder only exists if a retina sprite is set
|
342
|
+
@extend %sprite-placeholder-#{ $name }-retina !optional;
|
286
343
|
}
|
287
344
|
}
|
288
345
|
}
|
289
|
-
|
290
|
-
@extend %sprite-placeholder-#{ $name };
|
291
|
-
@if $use-retina {
|
292
|
-
// Set to optional because placeholder only exists if a retina sprite is set
|
293
|
-
@extend %sprite-placeholder-#{ $name }-retina !optional;
|
294
|
-
}
|
295
346
|
}
|
296
347
|
|
297
348
|
|
data/test/css/sprites/layout.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
.classic {
|
2
|
-
background-image: url('../../img/test-layout.png?
|
2
|
+
background-image: url('../../img/test-layout.png?18311386783117');
|
3
3
|
background-repeat: no-repeat;
|
4
4
|
}
|
5
5
|
|
6
6
|
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
7
7
|
.classic {
|
8
8
|
/* Retina sprite */
|
9
|
-
background-image: url('../../img/test-layout@2x.png?
|
9
|
+
background-image: url('../../img/test-layout@2x.png?18311386783117');
|
10
10
|
background-size: 718px auto;
|
11
11
|
}
|
12
12
|
}
|
@@ -3,14 +3,14 @@
|
|
3
3
|
* Compiled 2x sprite has all images aligned to the right
|
4
4
|
*/
|
5
5
|
.vertical {
|
6
|
-
background-image: url('../../img/test-position.png?
|
6
|
+
background-image: url('../../img/test-position.png?18321386783121');
|
7
7
|
background-repeat: no-repeat;
|
8
8
|
}
|
9
9
|
|
10
10
|
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
11
11
|
.vertical {
|
12
12
|
/* Retina sprite */
|
13
|
-
background-image: url('../../img/test-position@2x.png?
|
13
|
+
background-image: url('../../img/test-position@2x.png?18321386783121');
|
14
14
|
background-size: 281px auto;
|
15
15
|
}
|
16
16
|
}
|
@@ -20,14 +20,14 @@
|
|
20
20
|
* Compiled 2x sprite has all images aligned to the bottom
|
21
21
|
*/
|
22
22
|
.horizontal {
|
23
|
-
background-image: url('../../img/test-position-alt.png?
|
23
|
+
background-image: url('../../img/test-position-alt.png?18321386783121');
|
24
24
|
background-repeat: no-repeat;
|
25
25
|
}
|
26
26
|
|
27
27
|
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
28
28
|
.horizontal {
|
29
29
|
/* Retina sprite */
|
30
|
-
background-image: url('../../img/test-position-alt@2x.png?
|
30
|
+
background-image: url('../../img/test-position-alt@2x.png?18321386783121');
|
31
31
|
background-size: 421px auto;
|
32
32
|
}
|
33
33
|
}
|
data/test/css/sprites/repeat.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
.meassure-1, .meassure-2, .meassure-3 {
|
2
|
-
background-image: url('../../img/test-repeat.png?
|
2
|
+
background-image: url('../../img/test-repeat.png?18321386783123');
|
3
3
|
background-repeat: repeat-x;
|
4
4
|
}
|
5
5
|
|
6
6
|
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
7
7
|
.meassure-1, .meassure-2, .meassure-3 {
|
8
8
|
/* Retina sprite */
|
9
|
-
background-image: url('../../img/test-repeat@2x.png?
|
9
|
+
background-image: url('../../img/test-repeat@2x.png?18321386783123');
|
10
10
|
background-size: 378px auto;
|
11
11
|
background-repeat: no-repeat;
|
12
12
|
}
|
@@ -2,14 +2,14 @@
|
|
2
2
|
* Min device pixel ratio changed to 1.7
|
3
3
|
*/
|
4
4
|
.classic {
|
5
|
-
background-image: url('../../img/test-retina.png?
|
5
|
+
background-image: url('../../img/test-retina.png?18321386783125');
|
6
6
|
background-repeat: no-repeat;
|
7
7
|
}
|
8
8
|
|
9
9
|
@media only screen and (-webkit-min-device-pixel-ratio: 1.7), only screen and (min--moz-device-pixel-ratio: 1.7), only screen and (-moz-min-device-pixel-ratio: 1.7), only screen and (-ms-min-device-pixel-ratio: 1.7), only screen and (-o-min-device-pixel-ratio: 1.7 / 1), only screen and (min-device-pixel-ratio: 1.7), only screen and (min-resolution: 163.2dpi), only screen and (min-resolution: 1.7dppx) {
|
10
10
|
.classic {
|
11
11
|
/* Retina sprite */
|
12
|
-
background-image: url('../../img/test-retina@2x.png?
|
12
|
+
background-image: url('../../img/test-retina@2x.png?18321386783125');
|
13
13
|
background-size: 152px auto;
|
14
14
|
}
|
15
15
|
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
.classic, .no-media-queries .indy {
|
2
|
+
background-image: url('../../img/test-retina.png?18321386783131');
|
3
|
+
background-repeat: no-repeat;
|
4
|
+
}
|
5
|
+
|
6
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
7
|
+
.classic {
|
8
|
+
/* Retina sprite */
|
9
|
+
background-image: url('../../img/test-retina@2x.png?18321386783131');
|
10
|
+
background-size: 152px auto;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
.classic {
|
15
|
+
background-position: 0 -281px;
|
16
|
+
width: 152px;
|
17
|
+
height: 135px;
|
18
|
+
}
|
19
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
20
|
+
.classic {
|
21
|
+
/* Retina sprite */
|
22
|
+
background-position: 0 -140px;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.indy {
|
27
|
+
width: 128px;
|
28
|
+
height: 140px;
|
29
|
+
}
|
30
|
+
@media (min-width: 400px) {
|
31
|
+
.indy {
|
32
|
+
background-position: 0 -141px;
|
33
|
+
background-image: url('../../img/test-retina.png?18321386783131');
|
34
|
+
background-repeat: no-repeat;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 400px), only screen and (min--moz-device-pixel-ratio: 2) and (min-width: 400px), only screen and (-moz-min-device-pixel-ratio: 2) and (min-width: 400px), only screen and (-ms-min-device-pixel-ratio: 2) and (min-width: 400px), only screen and (-o-min-device-pixel-ratio: 2 / 1) and (min-width: 400px), only screen and (min-device-pixel-ratio: 2) and (min-width: 400px), only screen and (min-resolution: 192dpi) and (min-width: 400px), only screen and (min-resolution: 2dppx) and (min-width: 400px) {
|
38
|
+
.indy {
|
39
|
+
/* Retina sprite */
|
40
|
+
background-position: 0 0;
|
41
|
+
background-image: url('../../img/test-retina@2x.png?18321386783131');
|
42
|
+
background-size: 152px auto;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
@media (min-width: 960px) {
|
46
|
+
.indy {
|
47
|
+
background-position: 0 -281px;
|
48
|
+
background-image: url('../../img/test-retina.png?18321386783131');
|
49
|
+
background-repeat: no-repeat;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 960px), only screen and (min--moz-device-pixel-ratio: 2) and (min-width: 960px), only screen and (-moz-min-device-pixel-ratio: 2) and (min-width: 960px), only screen and (-ms-min-device-pixel-ratio: 2) and (min-width: 960px), only screen and (-o-min-device-pixel-ratio: 2 / 1) and (min-width: 960px), only screen and (min-device-pixel-ratio: 2) and (min-width: 960px), only screen and (min-resolution: 192dpi) and (min-width: 960px), only screen and (min-resolution: 2dppx) and (min-width: 960px) {
|
53
|
+
.indy {
|
54
|
+
/* Retina sprite */
|
55
|
+
background-position: 0 -140px;
|
56
|
+
background-image: url('../../img/test-retina@2x.png?18321386783131');
|
57
|
+
background-size: 152px auto;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
@media (min-width: 1024px) {
|
61
|
+
.indy {
|
62
|
+
background-position: 0 0;
|
63
|
+
background-image: url('../../img/test-retina.png?18321386783131');
|
64
|
+
background-repeat: no-repeat;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
.no-media-queries .indy {
|
68
|
+
background-position: 0 0;
|
69
|
+
}
|
data/test/css/sprites/retina.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
.classic, .indy, .alien {
|
2
|
-
background-image: url('../../img/test-retina.png?
|
2
|
+
background-image: url('../../img/test-retina.png?18321386783132');
|
3
3
|
background-repeat: no-repeat;
|
4
4
|
}
|
5
5
|
|
6
6
|
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
7
7
|
.classic, .indy {
|
8
8
|
/* Retina sprite */
|
9
|
-
background-image: url('../../img/test-retina@2x.png?
|
9
|
+
background-image: url('../../img/test-retina@2x.png?18321386783132');
|
10
10
|
background-size: 152px auto;
|
11
11
|
}
|
12
12
|
}
|
data/test/css/sprites/simple.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
.classic {
|
2
|
-
background-image: url('../../img/test-spacing.png?
|
2
|
+
background-image: url('../../img/test-spacing.png?18321386783138');
|
3
3
|
background-repeat: no-repeat;
|
4
4
|
}
|
5
5
|
|
6
6
|
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-ms-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
7
7
|
.classic {
|
8
8
|
/* Retina sprite */
|
9
|
-
background-image: url('../../img/test-spacing@2x.png?
|
9
|
+
background-image: url('../../img/test-spacing@2x.png?18321386783138');
|
10
10
|
background-size: 159px auto;
|
11
11
|
}
|
12
12
|
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
|
6
|
+
<title>Sprite: responsive</title>
|
7
|
+
|
8
|
+
<meta name="description" content="Ezy Grid Demo">
|
9
|
+
<meta name="viewport" content="width=device-width">
|
10
|
+
|
11
|
+
<link href="../../css/sprites/responsive.css" rel="stylesheet">
|
12
|
+
|
13
|
+
</head>
|
14
|
+
<body>
|
15
|
+
<div class="classic"> </div>
|
16
|
+
<div class="indy"> </div>
|
17
|
+
<div class="alien"> </div>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// Imports
|
3
|
+
|
4
|
+
@import "../../../sass/ezy/media";
|
5
|
+
@import "../../../sass/ezy/sprites";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// Defining media query breakpoints
|
9
|
+
|
10
|
+
$breakpoint-small: set-breakpoint( $max: 580px );
|
11
|
+
$breakpoint-medium: set-breakpoint( $min: 960px );
|
12
|
+
$breakpoint-large: set-breakpoint( $min: 1024px, $legacy-support: true ); // Support for legacy browsers
|
13
|
+
|
14
|
+
|
15
|
+
// ---------------------------------------------------------------------------
|
16
|
+
// Create sprite
|
17
|
+
|
18
|
+
@include make-sprite(
|
19
|
+
$name: "base",
|
20
|
+
$folder: "test-retina",
|
21
|
+
$folder-retina: "test-retina@2x"
|
22
|
+
);
|
23
|
+
|
24
|
+
// ---------------------------------------------------------------------------
|
25
|
+
// Use sprite
|
26
|
+
|
27
|
+
.classic {
|
28
|
+
@include background-sprite( "base", "classic" );
|
29
|
+
width: 152px;
|
30
|
+
height: 135px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.indy {
|
34
|
+
@include background-sprite(
|
35
|
+
$name: "base",
|
36
|
+
$image: "indy",
|
37
|
+
$at-breakpoint: "(min-width: 400px)"
|
38
|
+
);
|
39
|
+
@include background-sprite(
|
40
|
+
$name: "base",
|
41
|
+
$image: "classic",
|
42
|
+
$at-breakpoint: $breakpoint-medium
|
43
|
+
);
|
44
|
+
@include background-sprite(
|
45
|
+
$name: "base",
|
46
|
+
$image: "alien",
|
47
|
+
$use-retina: false,
|
48
|
+
$at-breakpoint: $breakpoint-large
|
49
|
+
);
|
50
|
+
width: 128px;
|
51
|
+
height: 140px;
|
52
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frej Raahede Nielsen
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- test/css/sprites/position.css
|
79
79
|
- test/css/sprites/repeat.css
|
80
80
|
- test/css/sprites/resolution.css
|
81
|
+
- test/css/sprites/responsive.css
|
81
82
|
- test/css/sprites/retina.css
|
82
83
|
- test/css/sprites/simple.css
|
83
84
|
- test/css/sprites/size.css
|
@@ -96,6 +97,7 @@ files:
|
|
96
97
|
- test/scss/sprites/position.scss
|
97
98
|
- test/scss/sprites/repeat.scss
|
98
99
|
- test/scss/sprites/resolution.scss
|
100
|
+
- test/scss/sprites/responsive.scss
|
99
101
|
- test/scss/sprites/retina.scss
|
100
102
|
- test/scss/sprites/simple.scss
|
101
103
|
- test/scss/sprites/size.scss
|
@@ -103,6 +105,7 @@ files:
|
|
103
105
|
- test/html/grid/fluid.html
|
104
106
|
- test/html/grid/responsive.html
|
105
107
|
- test/html/sprites/repeat.html
|
108
|
+
- test/html/sprites/responsive.html
|
106
109
|
- test/html/sprites/retina.html
|
107
110
|
- test/html/sprites/simple.html
|
108
111
|
- test/img/test-layout/alien.png
|
@@ -158,9 +161,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
161
|
version: '0'
|
159
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
163
|
requirements:
|
161
|
-
- - '
|
164
|
+
- - '>='
|
162
165
|
- !ruby/object:Gem::Version
|
163
|
-
version:
|
166
|
+
version: '0'
|
164
167
|
requirements: []
|
165
168
|
rubyforge_project:
|
166
169
|
rubygems_version: 2.1.10
|