
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.
51 lines
1.0 KiB
Plaintext
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[]
|