rspec/rules/S4650/css/rule.adoc

34 lines
748 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
``++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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
#div1 {
position: absolute;
width: calc(100%- 100px); /* Noncompliant; no space after the % sign */
}
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
#div1 {
position: absolute;
width: calc(100% - 100px);
}
----
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::rspecator-view[]