Skip to content

Commit eba6da1

Browse files
Fix SCSS-lint warnings
1 parent a9c63d5 commit eba6da1

11 files changed

Lines changed: 105 additions & 112 deletions

File tree

starter-template/scss/core/_extenders.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
@mixin clearfix($extend: true) {
22
@if $extend {
33
@extend %clearfix;
4-
}
5-
@else {
4+
} @else {
65
&:after {
76
clear: both;
87
content: '';
@@ -43,4 +42,4 @@
4342
position: static;
4443
width: auto;
4544
}
46-
}
45+
}

starter-template/scss/core/_normalize.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ img {
9393
}
9494

9595
// Correct overflow not hidden in IE 9/10/11.
96-
svg:not(:root) {
97-
overflow: hidden;
98-
}
96+
// Enable if you don't use <use ..>
97+
//svg:not(:root) {
98+
// overflow: hidden;
99+
//}
99100

100101
// Address margin not present in IE 8/9 and Safari.
101102
figure {
Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@import 'variables';
2-
@import "svg-sprite-map";
2+
@import 'svg-sprite-map';
33

44
// @author Mike Street
55
// modified by Devbridge
@@ -9,124 +9,124 @@
99
// @include svg-sprite('file-name', 'size in px or em');
1010

1111
$base-font-size: 16px !default;
12-
$ieSprite: '.ie8' !default;
12+
$ie-sprite: '.ie8' !default;
1313

1414
$sprite: map-get($icons, sprite) !default;
1515

1616
// Retrieve an attributes value for a specific icon in the sprite map
1717
@function sprite-attr($icon, $attr) {
18-
$newIcon: map-get($icons, $icon);
19-
@if $newIcon == null {
20-
@warn "Can't find an icon with the name #{$icon}";
21-
}
22-
@return map-get($newIcon, $attr);
18+
$new-icon: map-get($icons, $icon);
19+
@if $new-icon == null {
20+
@warn "Can't find an icon with the name #{$icon}";
21+
}
22+
@return map-get($new-icon, $attr);
2323
}
2424

2525
// Create a map with the specified icon of attributes
2626
@function icon-attr($icon) {
27-
$attr: (
28-
width: sprite-attr($icon, width),
29-
height: sprite-attr($icon, height),
30-
x: sprite-attr($icon, backgroundX),
31-
y: sprite-attr($icon, backgroundY)
32-
);
33-
34-
@return $attr;
27+
$attr: (
28+
width: sprite-attr($icon, width),
29+
height: sprite-attr($icon, height),
30+
x: sprite-attr($icon, backgroundX),
31+
y: sprite-attr($icon, backgroundY)
32+
);
33+
34+
@return $attr;
3535
}
3636

3737
@function parse-int($n) {
38-
@return $n / ($n * 0 + 1);
38+
@return $n / ($n * 0 + 1);
3939
}
4040

4141
@function px-to-em($px, $base: $base-font-size) {
42-
@if not unitless($px) {
43-
$px: parse-int($px);
44-
}
45-
@if not unitless($base) {
46-
$base: parse-int($base);
47-
}
48-
@return ($px / $base) * 1em;
42+
@if not unitless($px) {
43+
$px: parse-int($px);
44+
}
45+
@if not unitless($base) {
46+
$base: parse-int($base);
47+
}
48+
@return ($px / $base) * 1em;
4949
}
5050

51-
@function get-ratio($width, $height){
52-
@return parse-int($width / $height);
51+
@function get-ratio($width, $height) {
52+
@return parse-int($width / $height);
5353
}
5454

55-
@function get-scale($width, $new-width){
56-
@return parse-int($new-width / $width);
55+
@function get-scale($width, $new-width) {
56+
@return parse-int($new-width / $width);
5757
}
5858

5959
%sprite {
60-
display: inline-block;
61-
background-image: url(map-get($sprite, svgPath));
62-
background-size: map-get($sprite, width) map-get($sprite, height);
63-
background-repeat: no-repeat;
60+
background-image: url(map-get($sprite, svgPath));
61+
background-repeat: no-repeat;
62+
background-size: map-get($sprite, width) map-get($sprite, height);
63+
display: inline-block;
6464
}
6565

6666
%ie-sprite {
67-
background-image: url(map-get($sprite, pngPath));
67+
background-image: url(map-get($sprite, pngPath));
6868
}
6969

7070
@mixin svg-sprite($icon, $size: null) {
7171

72-
$sprite-width: map-get($sprite, width);
73-
$sprite-height: map-get($sprite, height);
72+
$sprite-width: map-get($sprite, width);
73+
$sprite-height: map-get($sprite, height);
7474

75-
$iconMap: icon-attr($icon);
76-
$icon-width: map-get($iconMap, width);
77-
$icon-height: map-get($iconMap, height);
78-
$icon-pos-x: map-get($iconMap, x);
79-
$icon-pos-y: map-get($iconMap, y);
75+
$icon-map: icon-attr($icon);
76+
$icon-width: map-get($icon-map, width);
77+
$icon-height: map-get($icon-map, height);
78+
$icon-pos-x: map-get($icon-map, x);
79+
$icon-pos-y: map-get($icon-map, y);
8080

81-
@if($size){
81+
@if($size){
8282

83-
$unit: unit($size);
84-
$ratio: get-ratio($icon-width, $icon-height);
83+
$unit: unit($size);
84+
$ratio: get-ratio($icon-width, $icon-height);
8585

86-
@if($unit == 'px'){
86+
@if($unit == 'px'){
8787

88-
$scale: get-scale($icon-width, $size);
88+
$scale: get-scale($icon-width, $size);
8989

90-
$icon-height: ($size / $ratio);
91-
$icon-width: $size;
90+
$icon-height: ($size / $ratio);
91+
$icon-width: $size;
9292

93-
$icon-pos-x: ($icon-pos-x * $scale);
94-
$icon-pos-y: ($icon-pos-y * $scale);
93+
$icon-pos-x: ($icon-pos-x * $scale);
94+
$icon-pos-y: ($icon-pos-y * $scale);
9595

96-
background-size: ($sprite-width * $scale) ($sprite-height * $scale);
97-
}
96+
background-size: ($sprite-width * $scale) ($sprite-height * $scale);
97+
}
9898

99-
@if($unit == 'em'){
99+
@if($unit == 'em'){
100100

101-
$icon-width: parse-int(px-to-em($icon-width)) * parse-int($size) + em;
102-
$icon-height: parse-int(px-to-em($icon-height)) * parse-int($size) + em;
101+
$icon-width: parse-int(px-to-em($icon-width)) * parse-int($size) + em;
102+
$icon-height: parse-int(px-to-em($icon-height)) * parse-int($size) + em;
103103

104-
$sprite-width: parse-int(px-to-em($sprite-width)) * parse-int($size) + em;
105-
$sprite-height: parse-int(px-to-em($sprite-height)) * parse-int($size) + em;
104+
$sprite-width: parse-int(px-to-em($sprite-width)) * parse-int($size) + em;
105+
$sprite-height: parse-int(px-to-em($sprite-height)) * parse-int($size) + em;
106106

107-
$icon-pos-x: parse-int(px-to-em($icon-pos-x)) * parse-int($size) + em;
108-
$icon-pos-y: parse-int(px-to-em($icon-pos-y)) * parse-int($size) + em;
107+
$icon-pos-x: parse-int(px-to-em($icon-pos-x)) * parse-int($size) + em;
108+
$icon-pos-y: parse-int(px-to-em($icon-pos-y)) * parse-int($size) + em;
109109

110-
background-size: $sprite-width $sprite-height;
110+
background-size: $sprite-width $sprite-height;
111111

112-
}
112+
}
113113

114-
@if($unit == '%'){
115-
@warn "SVG Icons - values in percentages are not supported";
116-
}
114+
@if($unit == '%'){
115+
@warn 'SVG Icons - values in percentages are not supported';
116+
}
117117

118-
}
118+
}
119119

120-
@extend %sprite;
121-
width: $icon-width;
122-
height: $icon-height;
123-
background-position: $icon-pos-x $icon-pos-y;
120+
@extend %sprite;
121+
width: $icon-width;
122+
height: $icon-height;
123+
background-position: $icon-pos-x $icon-pos-y;
124124

125-
// Add IE fallback
126-
// Works with icons with default size ONLY
127-
@if $ieSprite {
128-
#{$ieSprite} & {
129-
@extend %ie-sprite;
130-
}
131-
}
132-
}
125+
// Add IE fallback
126+
// Works with icons with default size ONLY
127+
@if $ie-sprite {
128+
#{$ie-sprite} & {
129+
@extend %ie-sprite;
130+
}
131+
}
132+
}

starter-template/scss/core/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ $base-font-size: 16px;
1212

1313
//module LINK COLORS
1414

15-
//module SELECTION COLORS
15+
//module SELECTION COLORS

starter-template/scss/modules/_forms.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
[disabled] {
88
cursor: not-allowed;
99
}
10-
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.noscript-message {
22
background-color: #fff1bb;
3+
font-size: 16px;
34
padding: 3px;
45
text-align: center;
5-
font-size: 16px;
66
z-index: 2147483647;
7-
}
7+
}

starter-template/scss/modules/_modal.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
}
2323

2424
.modal-context {
25-
-webkit-overflow-scrolling: touch;
2625
background-color: rgba(211, 211, 211, .8);
2726
height: 100%;
2827
left: 0;
28+
-webkit-overflow-scrolling: touch;
2929
overflow-y: scroll;
3030
position: fixed;
3131
top: 0;

starter-template/scss/modules/_slider.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
// Layout styles for Slider
55
// Url: http://kenwheeler.github.io/slick/
66

7-
@import "plugins/slick";
7+
@import 'plugins/slick';
Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
11
@charset "utf-8";
22

33
// Dependencies
4-
@import
5-
"bourbon",
6-
"neat";
4+
@import 'bourbon';
5+
@import 'neat';
76

87
// Core
9-
@import "core/normalize",
10-
"core/extenders",
11-
"core/mixins",
12-
"core/functions";
8+
@import 'core/normalize';
9+
@import 'core/extenders';
10+
@import 'core/mixins';
11+
@import 'core/functions';
1312

1413
// Base & Layout
15-
@import
16-
"site/layout";
14+
@import 'site/layout';
1715

1816
// Modules
19-
@import
20-
"modules/global",
21-
"modules/forms",
22-
"modules/modal",
23-
"modules/slider",
24-
"modules/tables",
25-
"modules/typography";
17+
@import 'modules/global';
18+
@import 'modules/forms';
19+
@import 'modules/modal';
20+
@import 'modules/slider';
21+
@import 'modules/tables';
22+
@import 'modules/typography';
2623

2724
// Pages
28-
@import
29-
"site/pages/home";
30-
25+
@import 'site/pages/home';
3126

3227
// Print
33-
@import
34-
"site/print";
28+
@import 'site/print';

starter-template/scss/site/_layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ body {
2424

2525
.clearfix {
2626
@include clearfix($extend: true)
27-
}
27+
}

0 commit comments

Comments
 (0)