No space allowed at end of parenthesis Open
background: $grey image-url( 'shinycms/admin-toolbar/bg.png' ) left top repeat-x;
- Read upRead up
- Exclude checks
Space Between Parens
Rule space-between-parens
will enforce whether or not a space should be included before the first item and after the last item inside parenthesis (()
).
Options
-
include
:true
/false
(defaults tofalse
)
Examples
When include: false
, the following are allowed. When include: true
, the following are disallowed:
@function foo($bar) {
@return $bar;
}
@mixin bar($baz) {
content: $baz;
}
.foo {
@include bar('Hello');
content: foo('bar');
width: calc(100% - 10px);
}
When include: true
, the following are allowed. When include: false
, the following are disallowed:
@function foo( $bar ) {
@return $bar;
}
@mixin bar($baz ) {
content: $baz;
}
.foo {
@include bar( 'Hello' );
content: foo( 'bar');
width: calc( 100% - 10px);
}
Type-selector should be nested within its parent Class Open
.shinycms-admin-toolbar-links 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
font-size: 0.8em;
- 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;
}
Pseudo-class should be nested within its parent Type-selector Open
.shinycms-admin-toolbar-links a:hover {
- 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 Class Open
.shinycms-admin-toolbar-links 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: '';
}
}
No space allowed at beginning of parenthesis Open
background: $grey image-url( 'shinycms/admin-toolbar/bg.png' ) left top repeat-x;
- Read upRead up
- Exclude checks
Space Between Parens
Rule space-between-parens
will enforce whether or not a space should be included before the first item and after the last item inside parenthesis (()
).
Options
-
include
:true
/false
(defaults tofalse
)
Examples
When include: false
, the following are allowed. When include: true
, the following are disallowed:
@function foo($bar) {
@return $bar;
}
@mixin bar($baz) {
content: $baz;
}
.foo {
@include bar('Hello');
content: foo('bar');
width: calc(100% - 10px);
}
When include: true
, the following are allowed. When include: false
, the following are disallowed:
@function foo( $bar ) {
@return $bar;
}
@mixin bar($baz ) {
content: $baz;
}
.foo {
@include bar( 'Hello' );
content: foo( 'bar');
width: calc( 100% - 10px);
}