-
Notifications
You must be signed in to change notification settings - Fork 1
/
_utilities.push.scss
71 lines (34 loc) · 1.46 KB
/
_utilities.push.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Push Utility
// Options
$iota-utils-push : true;
$iota-utils-push-namespace : 'push-' !default;
$iota-utils-push-delimiter : $iota-global-delimiter !default;
$iota-utils-push-columns : $iota-global-columns !default;
$iota-utils-push-res : false !default;
$iota-utils-push-breakpoints : $iota-global-breakpoints !default;
// Helper Local Variables
$iota-utils-push-var-push: $iota-global-utilities-namespace + $iota-utils-push-namespace;
// Push Utilities
@each $column-size in $iota-utils-push-columns {
@for $i from 1 through ($column-size - 1) {
$margin-size: ((100 / $column-size) * $i) * 1%;
.#{$iota-utils-push-var-push + $i + $iota-utils-push-delimiter + $column-size} {
@include _iota-directional-property('margin', null, null null null $margin-size, true);
}
}
}
// Push Responsive Utilities
@if ($iota-utils-push-res == true) {
@each $breakpoint-name, $breakpoint-size in $iota-utils-push-breakpoints {
@media #{$breakpoint-size} {
@each $column-size in $iota-utils-push-columns {
@for $i from 1 through ($column-size - 1) {
$margin-size: ((100 / $column-size) * $i) * 1%;
.#{$iota-utils-push-var-push + $i + $iota-utils-push-delimiter + $column-size + $iota-global-breakpoint-separator + $breakpoint-name} {
@include _iota-directional-property('margin', null, null null null $margin-size, true);
}
}
}
}
}
}