rspec/rules/S4648/css/rule.adoc

29 lines
734 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Having duplicated font names doesn't help to read the font declaration and may be an indicator the author of the line was not sure how to configure it. This rule raises an issue when ``++font++`` or ``++font-family++`` properties contain a duplicated font name. This rule ignores ``++$sass++``, ``++@less++``, and ``++var(--custom-property)++`` variable syntaxes.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
a {
font-family: 'Georgia', Georgia, serif; /* Noncompliant; 'Georgia' is duplicated */
}
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
a {
font-family: Georgia, serif;
}
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]