This rule forbid the use of !important
.
!important
make css maintenance hard, you should use it with care.
The following pattern are considered violations:
a {
color: white !important;
}
.foo {
color: white !important;
}
The ITCSS archi is based on layers, it can be usefull to use !important
in some of them like the utilities
one.
This option disable the rule in the layers targeted by the option's content.
For example, given ignoreLayers: ["utilities"]
The following patterns are not considered violations:
// file `styles/utilities/_utilities.util.css`
a {
color: white !important;
}
.foo {
color: white !important;
}
// file `styles/utilities/util.css`
a {
color: white !important;
}
.foo {
color: white !important;
}
The following patterns are considered violations:
// file `styles/layer/main.css`
a {
color: white !important;
}
.foo {
color: white !important;
}
// file `styles/layer/_layer.main.css`
a {
color: white !important;
}
.foo {
color: white !important;
}