-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path_lemonade.scss
38 lines (34 loc) · 928 Bytes
/
_lemonade.scss
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
@mixin image-dimensions($file) {
height: image-height($file);
width: image-width($file);
}
@mixin sprite-image($file) {
background: sprite-image($file) $repeat;
}
@mixin sized-sprite-image($file) {
background: sprite-image($file);
@include image-dimensions($file);
}
@mixin sprite-folder($folder, $image-dimensions: false) {
.#{$folder} {
@if $image-dimensions {
background: sprite-url($folder);
}
@else {
background: sprite-url($folder) no-repeat;
}
}
@for $i from 0 to sprite-files-in-folder($folder) {
$file: sprite-file-from-folder($folder, $i);
.#{$folder}-#{image-basename($file)} {
@extend .#{$folder};
background-position: sprite-position(sprite-file-from-folder($folder, $i));
@if $image-dimensions {
@include image-dimensions($file);
}
}
}
}
@mixin sized-sprite-folder($folder) {
@include sprite-folder($folder, true);
}