1
1
$prefix : ' .simple' ;
2
- $rowPrefix : ' #{$prefix } -row' ;
3
- $colPrefix : ' #{$prefix } -col' ;
4
- $flexRowPrefix : ' #{$rowPrefix } -flex' ;
5
- $flexJustifies : (' start' , ' end' , ' center' , ' space-around' , ' space-between' );
6
- $flexAligns : (' top' :' flex-start' , ' middle' :' center' , ' bottom' :' flex-end' );
7
- $gridCol : 24 ;
2
+ $row-prefix : ' #{$prefix } -row' ;
3
+ $col-prefix : ' #{$prefix } -col' ;
4
+ $flex-row-prefix : ' #{$row-prefix } -flex' ;
5
+ $flex-justifies : (' start' , ' end' , ' center' , ' space-around' , ' space-between' );
6
+ $flex-aligns : (' top' :' flex-start' , ' middle' :' center' , ' bottom' :' flex-end' );
7
+ $grid-col : 24 ;
8
8
@mixin generate-row {
9
- #{$rowPrefix } {
9
+ #{$row-prefix } {
10
10
display : block ;
11
11
position : relative ;
12
12
margin : 0 ;
13
13
height : auto ;
14
14
zoom : 1 ;
15
15
overflow : hidden ;
16
16
}
17
- #{$flexRowPrefix } {
17
+ #{$flex-row-prefix } {
18
18
display : flex ;
19
19
flex-direction : row ;
20
20
flex-wrap : wrap ;
21
21
}
22
- #{$colPrefix } {
22
+ #{$col-prefix } {
23
23
display : block ;
24
24
position : relative ;
25
25
}
26
- #{$flexRowPrefix } , #{$flexRowPrefix } , #{$colPrefix } {
26
+ #{$flex-row-prefix } , #{$flex-row-prefix } , #{$col-prefix } {
27
27
box-sizing : border-box ;
28
28
}
29
- @each $justify in $flexJustifies {
30
- #{$flexRowPrefix } - #{$justify } {
29
+ @each $justify in $flex-justifies {
30
+ #{$flex-row-prefix } - #{$justify } {
31
31
justify-content : #{$justify } ;
32
32
}
33
33
}
34
- @each $key , $value in $flexAligns {
35
- #{$flexRowPrefix } - #{$key } {
34
+ @each $key , $value in $flex-aligns {
35
+ #{$flex-row-prefix } - #{$key } {
36
36
align-items : #{$value } ;
37
37
}
38
38
}
39
39
}
40
40
41
41
@mixin generate-float-col ($viewport :' ' ) {
42
- $cols : ' #{$colPrefix } -span#{$viewport } -1' ;
43
- @for $i from 2 through $gridCol {
44
- $cols : ' #{$cols } ,#{$colPrefix } -span#{$viewport } -#{$i } ,' ;
42
+ $cols : ' #{$col-prefix } -span#{$viewport } -1' ;
43
+ @for $i from 2 through $grid-col {
44
+ $cols : ' #{$cols } ,#{$col-prefix } -span#{$viewport } -#{$i } ,' ;
45
45
}
46
46
#{$cols } {
47
47
float : left ;
@@ -50,21 +50,21 @@ $gridCol: 24;
50
50
}
51
51
52
52
@mixin generate-col ($viewport : ' ' ) {
53
- @for $i from 1 through $gridCol {
54
- #{$colPrefix } -span #{$viewport } - #{$i } {
55
- width : percentage ($i / $gridCol );
53
+ @for $i from 1 through $grid-col {
54
+ #{$col-prefix } -span #{$viewport } - #{$i } {
55
+ width : percentage ($i / $grid-col );
56
56
}
57
57
58
- #{$colPrefix } -push #{$viewport } - #{$i } {
59
- left : percentage ($i / $gridCol );
58
+ #{$col-prefix } -push #{$viewport } - #{$i } {
59
+ left : percentage ($i / $grid-col );
60
60
}
61
61
62
- #{$colPrefix } -pull #{$viewport } - #{$i } {
63
- right : percentage ($i / $gridCol );
62
+ #{$col-prefix } -pull #{$viewport } - #{$i } {
63
+ right : percentage ($i / $grid-col );
64
64
}
65
65
66
- #{$colPrefix } -offset #{$viewport } - #{$i } {
67
- margin-left : percentage ($i / $gridCol );
66
+ #{$col-prefix } -offset #{$viewport } - #{$i } {
67
+ margin-left : percentage ($i / $grid-col );
68
68
}
69
69
}
70
70
}
0 commit comments