Showing 657 of 658 total issues
Type-selector should be nested within its parent Class Open
.sidebar header a:hover {
- Read upRead up
- Exclude checks
Force Element Nesting
Rule force-element-nesting
will enforce the nesting of elements
Examples
When enabled, the following are disallowed:
div p {
content: '';
}
.parent {
&__child h1 {
content: '';
}
}
a[target="_blank"] span {
content: '';
}
When enabled, the following are allowed:
div {
p {
content: '';
}
}
.parent {
&__child {
h1 {
content: '';
}
}
}
a[target="_blank"] {
span {
content: '';
}
}
Don't include leading zeros on numbers Open
padding-top: 0.5em !important;
- Read upRead up
- Exclude checks
Leading Zero
Rule leading-zero
will enforce whether or not decimal numbers should include a leading zero.
Options
-
include
:true
/false
(defaults tofalse
)
Examples
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
font-size: .5em;
}
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
font-size: 0.5em;
}
Class should be nested within its parent Class Open
.comment_form .author {
- Read upRead up
- Exclude checks
Force Element Nesting
Rule force-element-nesting
will enforce the nesting of elements
Examples
When enabled, the following are disallowed:
div p {
content: '';
}
.parent {
&__child h1 {
content: '';
}
}
a[target="_blank"] span {
content: '';
}
When enabled, the following are allowed:
div {
p {
content: '';
}
}
.parent {
&__child {
h1 {
content: '';
}
}
}
a[target="_blank"] {
span {
content: '';
}
}
Selector field_with_errors
should be written in lowercase with hyphens Open
input.field_with_errors, select.field_with_errors, textarea.field_with_errors {
- Exclude checks
Avoid qualifying class selectors with an element. Open
input.field_with_errors, select.field_with_errors, textarea.field_with_errors {
- Exclude checks
Line should be indented 2 spaces, but was indented 4 spaces Open
list-style: none;
- Exclude checks
ID selectors not allowed Open
#content h2 {
- Read upRead up
- Exclude checks
No IDs
Rule no-ids
will enforce that ID selectors are not allowed to be used.
Examples
When enabled, the following are disallowed:
#foo {
content: 'bar';
}
Don't include leading zeros on numbers Open
padding: 0.5em;
- Read upRead up
- Exclude checks
Leading Zero
Rule leading-zero
will enforce whether or not decimal numbers should include a leading zero.
Options
-
include
:true
/false
(defaults tofalse
)
Examples
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
font-size: .5em;
}
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
font-size: 0.5em;
}
Type-selector should be nested within its parent Type-selector Open
.sidebar header a {
- Read upRead up
- Exclude checks
Force Element Nesting
Rule force-element-nesting
will enforce the nesting of elements
Examples
When enabled, the following are disallowed:
div p {
content: '';
}
.parent {
&__child h1 {
content: '';
}
}
a[target="_blank"] span {
content: '';
}
When enabled, the following are allowed:
div {
p {
content: '';
}
}
.parent {
&__child {
h1 {
content: '';
}
}
}
a[target="_blank"] {
span {
content: '';
}
}
A value of none
is not allowed. 0
must be used. Open
border: none;
- Read upRead up
- Exclude checks
Border Zero
Rule border-zero
will enforce whether one should use 0
or none
when specifying a zero border
value
Options
-
convention
:'0'
/'none'
(defaults to0
)
If an invalid convention is provided the rule will default back to
convention: '0'
. An extra warning/error will also be thrown online 1
column 1
of a file with a lint issue to inform you of this fact.
Examples
When convention: '0'
, the following are allowed. When convention: 'none'
, the following are disallowed:
.foo {
border: 0;
}
.bar {
border-right: 0;
}
When convention: 'none'
, the following are allowed. When convention: '0'
, the following are disallowed:
.foo {
border: none;
}
.bar {
border-left: none;
}
Invalid conventions
When the invalid convention convention: 'zero'
is supplied, the following are allowed as the rule defaults to convention: '0'
.
.foo {
border: none;
}
.bar {
border-left: 0;
}
Each selector in a comma sequence should be on its own single line Open
input.field_with_errors, select.field_with_errors, textarea.field_with_errors {
- Exclude checks
Selectors must be placed on new lines Open
.sidebar header, p {
- Read upRead up
- Exclude checks
Single Line Per Selector
Rule single-line-per-selector
will enforce whether selectors should be placed on a new line.
Examples
When enabled, the following are allowed:
.foo,
.bar {
content: 'baz';
}
When enabled, the following are disallowed:
.foo, .bar {
content: 'baz';
}
Avoid vendor prefixes. Open
background-image: -moz-linear-gradient(top, $button-bg, $button-bg-active);
- Exclude checks
Don't include leading zeros on numbers Open
padding: 0.5em;
- Read upRead up
- Exclude checks
Leading Zero
Rule leading-zero
will enforce whether or not decimal numbers should include a leading zero.
Options
-
include
:true
/false
(defaults tofalse
)
Examples
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
font-size: .5em;
}
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
font-size: 0.5em;
}
!important not allowed Open
color: $light-blue !important;
- Read upRead up
- Exclude checks
No Important
Rule no-important
will enforce that important declarations are not allowed to be used.
Examples
When enabled, the following are disallowed:
.foo {
content: 'bar' !important;
}
Pseudo-class should be nested within its parent Type-selector Open
.sidebar li:first-child {
- Read upRead up
- Exclude checks
Force Pseudo Nesting
Rule force-pseudo-nesting
will enforce the nesting of pseudo elements/classes.
Examples
When enabled, the following are disallowed: ```scss p:nth-of-type(2) { margin: 0; }
.parent { .child { p::first-line { color: #ff0000; } } }
.parent { .child { .sub p::first-line { color: #ff0000; } } } ```
When enabled, the following are allowed:
p {
&:nth-of-type(2) {
margin: 0;
}
}
.parent {
.child {
p {
&::first-line {
color: #ff0000;
}
}
}
}
.parent {
.child {
.sub p {
&::first-line {
color: #ff0000;
}
}
}
}
Type-selector should be nested within its parent Type-selector Open
.content header a,
- Read upRead up
- Exclude checks
Force Element Nesting
Rule force-element-nesting
will enforce the nesting of elements
Examples
When enabled, the following are disallowed:
div p {
content: '';
}
.parent {
&__child h1 {
content: '';
}
}
a[target="_blank"] span {
content: '';
}
When enabled, the following are allowed:
div {
p {
content: '';
}
}
.parent {
&__child {
h1 {
content: '';
}
}
}
a[target="_blank"] {
span {
content: '';
}
}
Type-selector should be nested within its parent Class Open
.banner p a {
- Read upRead up
- Exclude checks
Force Element Nesting
Rule force-element-nesting
will enforce the nesting of elements
Examples
When enabled, the following are disallowed:
div p {
content: '';
}
.parent {
&__child h1 {
content: '';
}
}
a[target="_blank"] span {
content: '';
}
When enabled, the following are allowed:
div {
p {
content: '';
}
}
.parent {
&__child {
h1 {
content: '';
}
}
}
a[target="_blank"] {
span {
content: '';
}
}
!important not allowed Open
color: $light-blue !important;
- Read upRead up
- Exclude checks
No Important
Rule no-important
will enforce that important declarations are not allowed to be used.
Examples
When enabled, the following are disallowed:
.foo {
content: 'bar' !important;
}
Pseudo-class should be nested within its parent Type-selector Open
.post p:first-of-type img {
- Read upRead up
- Exclude checks
Force Pseudo Nesting
Rule force-pseudo-nesting
will enforce the nesting of pseudo elements/classes.
Examples
When enabled, the following are disallowed: ```scss p:nth-of-type(2) { margin: 0; }
.parent { .child { p::first-line { color: #ff0000; } } }
.parent { .child { .sub p::first-line { color: #ff0000; } } } ```
When enabled, the following are allowed:
p {
&:nth-of-type(2) {
margin: 0;
}
}
.parent {
.child {
p {
&::first-line {
color: #ff0000;
}
}
}
}
.parent {
.child {
.sub p {
&::first-line {
color: #ff0000;
}
}
}
}