rspec/rules/S4666/css/rule.adoc
2022-02-04 16:28:24 +00:00

37 lines
663 B
Plaintext

Duplication of selectors might indicate a copy-paste mistake. The rule detects the following kinds of duplications:
* within a list of selectors in a single rule set
* for duplicated selectors in different rule sets within a single stylesheet.
== Noncompliant Code Example
[source,css]
----
.foo, .bar, .foo { ... } /* Noncompliant */
.class1 { ... }
.class1 { ... } /* Noncompliant */
----
== Compliant Solution
[source,css]
----
.foo, .bar { ... }
.class1 { ... }
.class2 { ... }
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]