Skip to content

Commit 93caa47

Browse files
author
anthinkingcoder
committed
variable names from camelCased to dash-cased
1 parent c181d93 commit 93caa47

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed

.postcssrc.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@ module.exports = {
66
"postcss-url": {},
77
// to edit target browsers: use "browserslist" field in package.json
88
"autoprefixer": {},
9-
"postcss-write-svg": {},
10-
"postcss-px-to-viewport": {
11-
}
129
}
1310
}

src/styles/grid.scss

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
$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;
88
@mixin generate-row {
9-
#{$rowPrefix} {
9+
#{$row-prefix} {
1010
display: block;
1111
position: relative;
1212
margin: 0;
1313
height: auto;
1414
zoom: 1;
1515
overflow: hidden;
1616
}
17-
#{$flexRowPrefix} {
17+
#{$flex-row-prefix} {
1818
display: flex;
1919
flex-direction: row;
2020
flex-wrap: wrap;
2121
}
22-
#{$colPrefix} {
22+
#{$col-prefix} {
2323
display: block;
2424
position: relative;
2525
}
26-
#{$flexRowPrefix}, #{$flexRowPrefix}, #{$colPrefix} {
26+
#{$flex-row-prefix}, #{$flex-row-prefix}, #{$col-prefix} {
2727
box-sizing: border-box;
2828
}
29-
@each $justify in $flexJustifies {
30-
#{$flexRowPrefix}-#{$justify} {
29+
@each $justify in $flex-justifies {
30+
#{$flex-row-prefix}-#{$justify} {
3131
justify-content: #{$justify};
3232
}
3333
}
34-
@each $key, $value in $flexAligns {
35-
#{$flexRowPrefix}-#{$key} {
34+
@each $key, $value in $flex-aligns {
35+
#{$flex-row-prefix}-#{$key} {
3636
align-items: #{$value};
3737
}
3838
}
3939
}
4040

4141
@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},';
4545
}
4646
#{$cols} {
4747
float: left;
@@ -50,21 +50,21 @@ $gridCol: 24;
5050
}
5151

5252
@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);
5656
}
5757

58-
#{$colPrefix}-push#{$viewport}-#{$i} {
59-
left: percentage($i / $gridCol);
58+
#{$col-prefix}-push#{$viewport}-#{$i} {
59+
left: percentage($i / $grid-col);
6060
}
6161

62-
#{$colPrefix}-pull#{$viewport}-#{$i} {
63-
right: percentage($i / $gridCol);
62+
#{$col-prefix}-pull#{$viewport}-#{$i} {
63+
right: percentage($i / $grid-col);
6464
}
6565

66-
#{$colPrefix}-offset#{$viewport}-#{$i} {
67-
margin-left: percentage($i / $gridCol);
66+
#{$col-prefix}-offset#{$viewport}-#{$i} {
67+
margin-left: percentage($i / $grid-col);
6868
}
6969
}
7070
}

0 commit comments

Comments
 (0)