diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-13 14:50:26 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-13 14:50:26 +0530 |
| commit | 1f147a779114a641b4abe5e47ac0b05433ec02fb (patch) | |
| tree | d27845a0ac2deee6bd5ba652da692e733c0cf589 /tests/fixtures/todo-app | |
| parent | 48455e6caaa7ad98316bbb4896b59f4487ad8650 (diff) | |
| download | css-everything-1f147a779114a641b4abe5e47ac0b05433ec02fb.tar.gz css-everything-1f147a779114a641b4abe5e47ac0b05433ec02fb.zip | |
feat: finalizes component system. it fucking works holy shit.
Diffstat (limited to 'tests/fixtures/todo-app')
| -rw-r--r-- | tests/fixtures/todo-app/index.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/fixtures/todo-app/index.html b/tests/fixtures/todo-app/index.html new file mode 100644 index 0000000..66a9798 --- /dev/null +++ b/tests/fixtures/todo-app/index.html @@ -0,0 +1,49 @@ +<html lang="en"> + <head> + <title>Task destroyer</title> + <meta charset="UTF-8" /> + <style> + body { + --cssx-children: form#task-input-form #task-list; + } + + #task-input-form { + --cssx-on-submit: + prevent-default() + js-eval('console.log("todo: implement add new task")') + ; + + --cssx-children: + input#text-input[data-testid="add-task-input"] + button#create-task-btn[type="submit"][data-testid="add-task-btn"] + ; + } + + #text-input {} + #create-task-btn { + --cssx-text: Submit; + } + + #task-list { + --cssx-children: + instance(li#task-item, map( + --text: "hello world", + --checked: 0 + )) + instance(li#task-item, map( + --text: "coolio stuff", + --checked: 0 + )) + ; + } + + [data-instance="task-item"] { + --text: "default text"; + --checked: 0; + + --cssx-text: var(--text); + } + </style> + </head> + <body></body> +</html> |
