org.sonar.l10n.css.rules.css.S4656.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-javascript-plugin Show documentation
Show all versions of sonar-javascript-plugin Show documentation
Code Analyzer for JavaScript/TypeScript/CSS
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
}