rspec/rules/S4648/css/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

35 lines
848 B
Plaintext

== Why is this an issue?
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.
=== Noncompliant code example
[source,css]
----
a {
font-family: 'Georgia', Georgia, serif; /* Noncompliant; 'Georgia' is duplicated */
}
----
=== Compliant solution
[source,css]
----
a {
font-family: Georgia, serif;
}
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
=== on 4 Jun 2018, 09:28:45 Ann Campbell wrote:
\[~alexandre.gigleux], there's no "why" here.
endif::env-github,rspecator-view[]