diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-01-21 21:14:33 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-21 21:14:33 +0530 |
| commit | 1034dc5d453cefb0e86bca9eae97bce527ad985d (patch) | |
| tree | d2f631dd8a177f4b34ff412902732b7ee995563f | |
| parent | 4d1759729b0ccbcdd39ef01d6ab43a3bdbffaf31 (diff) | |
| download | css-everything-1034dc5d453cefb0e86bca9eae97bce527ad985d.tar.gz css-everything-1034dc5d453cefb0e86bca9eae97bce527ad985d.zip | |
Update how-it-works.md
| -rw-r--r-- | docs/how-it-works.md | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/docs/how-it-works.md b/docs/how-it-works.md index 585b8cc..d97f9fe 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -75,17 +75,12 @@ This is by far the most "fun" aspect of this project. Take a look at the docs fo ```css #my-element { - --factorial: - func(--n: number) - if( - js-eval(string(get-var(--n), '> 1')), - js-eval(string( - get-var(--n), - ' * ', - call(--factorial, map(--n: js-eval(string(get-var(--n), ' - 1')))) - )), - 1 - ); + --factorial: func(--n: number) + if(lte(get-var(--n), 1), 1, + calc( + get-var(--n) + * call(--factorial, map(--n: calc(get-var(--n) - 1))) + )); --cssx-on-mount: js-eval(string( 'console.log("', |
