diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-01-21 20:43:36 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-01-21 20:46:38 +0530 |
| commit | 4155a556f630022392818b70f374809b31d49236 (patch) | |
| tree | db48a9e3deba5b3f3064711eafa68bd4ba210ef3 /docs | |
| parent | e4db8ebdd6a36df0b3d76504d18d8f183fe46ba9 (diff) | |
| download | css-everything-4155a556f630022392818b70f374809b31d49236.tar.gz css-everything-4155a556f630022392818b70f374809b31d49236.zip | |
docs: readme
Diffstat (limited to '')
| -rw-r--r-- | docs/api/functions.md | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/docs/api/functions.md b/docs/api/functions.md index e7bce4f..c5c4cde 100644 --- a/docs/api/functions.md +++ b/docs/api/functions.md @@ -13,7 +13,7 @@ type pair = string: any ## Core -### get-var +### get-var / var Get css custom property from an element. Basically var but evaluated lazily. NOTE: Avoid using `var` inside cssx expressions. @@ -30,6 +30,22 @@ Example - } ``` +### calc +Do some math using the calc syntax. Not 100% compatible but it'll do. + +Supported units: rem, em, px, %, ms, s + +```typescript +function calc(calc-expr): string +``` + +Example - +```css +#my-element { + --cssx-text: calc(1 + 5 * get-var(--some-variable)); +} +``` + #### update Update a css custom property on an element |
