From 6a04167058b59b54b183104a1cf1b1b2cf8d7e9a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 10 Aug 2023 18:18:25 +0530 Subject: feat: adds dummy example ideas --- examples/todo-list/style.css | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 examples/todo-list/style.css (limited to 'examples/todo-list/style.css') diff --git a/examples/todo-list/style.css b/examples/todo-list/style.css new file mode 100644 index 0000000..aeffde5 --- /dev/null +++ b/examples/todo-list/style.css @@ -0,0 +1,38 @@ +body { + --cssx-children: todo-container; +} + +#todo-container { + --cssx-children: todo-input todo-list; + --todo-list: list(); +} + +#todo-input { + --cssx-children: input-field submit-btn; +} + +#submit-btn { + --cssx-on-click: update( + todo-container, + --todo-list, + list-append( + var(--todo-list), + tuple(get-attr(input-field, value), false) + ) + ); +} +#submit-btn::after { + content: "Submit"; +} + +#todo-list { + --cssx-iter-children: iter(var(--todo-list), --todo-item, todo-item); +} + +#todo-item { + +} +#todo-item::after { + content: var(--todo-item); +} + -- cgit v1.3.1