diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-25 12:14:42 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-25 12:14:42 +0530 |
| commit | ca0737e393bbf5c45f688593bbfaf41079a66784 (patch) | |
| tree | f3de7e5ce2bbd022fabd50db23bd54a240a89735 /examples/clock/style.css | |
| parent | f7ea49c88717c0c15835c9024c84a95678836a30 (diff) | |
| download | css-everything-ca0737e393bbf5c45f688593bbfaf41079a66784.tar.gz css-everything-ca0737e393bbf5c45f688593bbfaf41079a66784.zip | |
feat: h expressions for declaring elements
Diffstat (limited to '')
| -rw-r--r-- | examples/clock/style.css | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/clock/style.css b/examples/clock/style.css index c23e033..07b8cc9 100644 --- a/examples/clock/style.css +++ b/examples/clock/style.css @@ -6,7 +6,13 @@ font-family: sans-serif; color: #555; - --cssx-children: div#digital div#analog; + --cssx-children: + div#digital + h(div#analog, map(), seq( + div#seconds.analog-clock-hand, + div#minutes.analog-clock-hand, + div#hours.analog-clock-hand + )); } body * { box-sizing: border-box; } @@ -44,7 +50,6 @@ body * { box-sizing: border-box; } --cssx-on-mount: update(--date, call(--get-date)); --cssx-on-update: - update('[data-element=seconds]', --angle, js-eval("360 * new Date().getSeconds() / 60 - 90")), update('[data-element=seconds]', --angle, js-eval("360 * new Date().getSeconds() / 60 - 90")) update('[data-element=minutes]', --angle, js-eval("360 * new Date().getMinutes() / 60 - 90")) update('[data-element=hours]', --angle, @@ -52,12 +57,6 @@ body * { box-sizing: border-box; } ) delay(1s) update(--date, call(--get-date)); - - --cssx-children: - div#seconds.analog-clock-hand - div#minutes.analog-clock-hand - div#hours.analog-clock-hand - ; } [data-element=seconds].analog-clock-hand { |
