rspec/rules/S4656/css/rule.adoc

28 lines
557 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
a {
color: pink;
background: orange;
color: orange
}
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
a {
color: pink;
background: orange
}
----