rspec/rules/S4650/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

51 lines
1.0 KiB
Plaintext

== Why is this an issue?
``++calc++`` is a CSS3 function that provides the possibility to do simple math in CSS (add, subtract, divide, multiply). Without spaces around operators, ``++calc++`` will have no effect.
More precisely, before an operator, there must be a single whitespace or a newline plus indentation. After an operator, there must be a single whitespace or a newline.
=== Noncompliant code example
[source,css]
----
#div1 {
position: absolute;
width: calc(100%- 100px); /* Noncompliant; no space after the % sign */
}
----
=== Compliant solution
[source,css]
----
#div1 {
position: absolute;
width: calc(100% - 100px);
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Add spaces around this operator.
'''
== Comments And Links
(visible only on this page)
=== on 12 Jun 2019, 17:11:34 Elena Vilchik wrote:
I removed it from sonar way, as new rule RSPEC-5362 overlaps with it
endif::env-github,rspecator-view[]