Files must end with a new line Open
$icons-width: 2.5rem;
- Read upRead up
- Exclude checks
Final Newline
Rule final-newline
will enforce whether or not files should end with a newline.
Options
-
include
:true
/false
(defaults totrue
)
Examples
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
content: 'bar';
}
// Newline under this comment at end of file
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
content: 'bar';
}
// No newline under this comment at end of file
Color 'green' should be written in its hexadecimal form #008000 Open
$color-flash: green;
- Read upRead up
- Exclude checks
Color Keyword
Rule no-color-keywords
will enforce the use of hexadecimal color values rather than literals.
Examples
When enabled the following are allowed:
$new-red: #ff0000;
.foo {
color: #ff0000;
}
When enabled the following are disallowed:
$new-red: red;
.foo {
color: red;
}
Color 'black' should be written in its hexadecimal form #000000 Open
$color-black: black;
- Read upRead up
- Exclude checks
Color Keyword
Rule no-color-keywords
will enforce the use of hexadecimal color values rather than literals.
Examples
When enabled the following are allowed:
$new-red: #ff0000;
.foo {
color: #ff0000;
}
When enabled the following are disallowed:
$new-red: red;
.foo {
color: red;
}
Color 'gray' should be written in its hexadecimal form #808080 Open
$color-dark-gray: gray;
- Read upRead up
- Exclude checks
Color Keyword
Rule no-color-keywords
will enforce the use of hexadecimal color values rather than literals.
Examples
When enabled the following are allowed:
$new-red: #ff0000;
.foo {
color: #ff0000;
}
When enabled the following are disallowed:
$new-red: red;
.foo {
color: red;
}
Hex notation should all be lower case Open
$color-light-gray: #DDD;
- Read upRead up
- Exclude checks
Hex Notation
Rule hex-notation
will enforce the case of hexadecimal values
Options
-
style
:lowercase
/uppercase
(defaults tolowercase
)
Examples
When style: lowercase
, the following are allowed. When style: uppercase
, the following are disallowed:
$foo-color: #fff;
.bar {
background: linear-gradient(top, #cc2, #44d);
}
.baz {
color: #12a;
}
When style: uppercase
, the following are allowed. When style: lowercase
, the following are disallowed:
$foo-color: #FFF;
.bar {
background: linear-gradient(top, #CC2, #44D);
}
.baz {
color: #12A;
}
In both cases the following will be allowed as the values contain only numbers:
.qux {
color: #123;
}
Color gray
should be written in hexadecimal form as #808080
Open
$color-dark-gray: gray;
- Exclude checks
Color #DDD
should be written as #ddd
Open
$color-light-gray: #DDD;
- Exclude checks
Color green
should be written in hexadecimal form as #008000
Open
$color-flash: green;
- Exclude checks
Color black
should be written in hexadecimal form as #000000
Open
$color-black: black;
- Exclude checks
Files should end with a trailing newline Open
$icons-width: 2.5rem;
- Exclude checks