CSS allows duplicate property names but only the last instance of a duplicated name determines the actual value that will be used for it.
Therefore, changing values of other occurrences of a duplicated name will have no effect and may cause misunderstandings and bugs.
This rule ignores $sass
, @less
, and var(--custom-property)
variable syntaxes.
Noncompliant code example
a {
color: pink;
background: orange;
color: orange
}
Compliant solution
a {
color: pink;
background: orange
}