diff --git a/index.html b/index.html index 883de72e4..babf40352 100644 --- a/index.html +++ b/index.html @@ -63,6 +63,7 @@ @@ -258,6 +259,52 @@ +
The function calc() allows to define CSS values with the use of mathematical expressions, the value adopted for the property is the result of a mathematical expression.
+<div class="box-example"></div>
+
+ .box-example {
+ width: calc(100% - 60px);
+}
+
+ <length>, <frequency>, <angle>, <time>, <number>, <color>, or <integer> is allowed, like width, height, font-size, top, left, etc.✅ No caveats.
+Creates a circle shape with pure CSS.
diff --git a/snippets/calc.md b/snippets/calc.md new file mode 100644 index 000000000..27b8b040a --- /dev/null +++ b/snippets/calc.md @@ -0,0 +1,50 @@ +### Calc() + +The function calc() allows to define CSS values with the use of mathematical expressions, the value adopted for the property is the result of a mathematical expression. + +#### HTML + +```html + +``` + +#### CSS + +```css +.box-example { + width: calc(100% - 60px); +} +``` + +#### Demo + +