rspec/rules/S4666/css/rule.adoc

37 lines
663 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,css]
2021-04-28 16:49:39 +02:00
----
.foo, .bar, .foo { ... } /* Noncompliant */
.class1 { ... }
.class1 { ... } /* Noncompliant */
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,css]
2021-04-28 16:49:39 +02:00
----
.foo, .bar { ... }
.class1 { ... }
.class2 { ... }
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]