Skip to content

Commit c0734ce

Browse files
authored
Add CSS math functions (#608)
* Add CSS math functions * Update calc-constants.yml * Update calc-constants.yml * Update calc.yml * Update and rename css-comparison.yml to min-max-clamp.yml * Update and rename css-exponential.yml to exponential-functions.yml * Update calc.yml * Update and rename css-round.yml to round-mod-rem.yml * Update and rename css-trig.yml to trig-functions.yml * Update and rename css-sign.yml to abs-sign.yml * Rename exponential-functions.yml to exp-functions.yml
1 parent 4fe960c commit c0734ce

File tree

7 files changed

+58
-0
lines changed

7 files changed

+58
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: abs() and sign()
2+
description: The `abs()` and `sign()` CSS functions compute the absolute value or the sign of the input.
3+
spec: https://drafts.csswg.org/css-values-4/#sign-funcs
4+
compat_features:
5+
- css.types.abs
6+
- css.types.sign
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: calc() constants
2+
description: The `e`, `pi`, `infinity`, and `NaN` constants are accepted in CSS math functions such as `calc()`.
3+
spec: https://drafts.csswg.org/css-values-4/#calc-keywords
4+
compat_features:
5+
- css.types.calc-constant
6+
- css.types.calc-constant.NaN
7+
- css.types.calc-constant.e
8+
- css.types.calc-constant.infinity
9+
- css.types.calc-constant.pi

feature-group-definitions/calc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: calc()
2+
description: The `calc()` CSS function computes mathematical expressions such a `calc(100%/3 - 1em)`.
3+
spec: https://drafts.csswg.org/css-values-3/#calc-notation
4+
caniuse: calc
5+
compat_features:
6+
- css.types.calc
7+
- css.types.calc.gradient_color_stops
8+
- css.types.calc.nested
9+
- css.types.calc.number_values
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: pow(), sqrt(), hypot(), log(), and exp()
2+
description: The `pow()`, `sqrt()`, `hypot()`, `log()`, and `exp()` CSS functions compute various exponential functions.
3+
spec: https://drafts.csswg.org/css-values-4/#exponent-funcs
4+
compat_features:
5+
- css.types.pow
6+
- css.types.sqrt
7+
- css.types.hypot
8+
- css.types.log
9+
- css.types.exp
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: min(), max(), and clamp()
2+
description: The `min()` and `max()` CSS functions return the minimum or maximum of the arguments, while `clamp()` clamps a value to a given range.
3+
spec: https://drafts.csswg.org/css-values-4/#comp-func
4+
compat_features:
5+
- css.types.min
6+
- css.types.max
7+
- css.types.clamp
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: round(), mod(), and rem()
2+
description: The `round()`, `mod()`, and `rem()` CSS functions compute rounded values and the remainder after division.
3+
spec: https://drafts.csswg.org/css-values-4/#round-func
4+
compat_features:
5+
- css.types.round
6+
- css.types.mod
7+
- css.types.rem
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: sin(), cos(), tan(), asin(), acos(), atan(), and atan2()
2+
description: The `sin()`, `cos()`, `tan()`, `asin()`, `acos()`, `atan()`, and `atan2()` CSS functions compute various trigonometric functions.
3+
spec: https://drafts.csswg.org/css-values-4/#trig-funcs
4+
compat_features:
5+
- css.types.sin
6+
- css.types.cos
7+
- css.types.tan
8+
- css.types.asin
9+
- css.types.acos
10+
- css.types.atan
11+
- css.types.atan2

0 commit comments

Comments
 (0)