Tabs
Tabs selected by click or arrow keys, with the ARIA tab pattern written from one state.
Native checkboxes whose label fades when done, with a short animation when a task is checked or unchecked.
Check and uncheck the tasks with the mouse or with Space.
| name | value | previous | changes |
|---|---|---|---|
| Waiting for the preview to start. | |||
Native checkboxes with a reaction CSS cannot write: an animation that plays only when the user checks or unchecks a task, not when the page loads already checked.
:checked + span { opacity: 0.5 } gives the fade without a script. The one-time animation on the change is what native CSS cannot express: :checked also matches a box that was checked on load.
/* ---- Reactive CSS -------------------------------------------------------------------------- *//* The text next to the checkbox reads the state, so it lives on the label around both. */.tasks .task { --done: state(false); }.tasks .task input:on(change) { --done: set(event(checked)); }.tasks .task span { opacity: when(--done, 0.5, 1); }/* :just-checked matches for one animation after a real check. */.tasks input:just-checked + span { animation: tasks-pop 300ms; }.tasks input:just-unchecked + span { animation: tasks-settle 300ms; }Source: site/src/catalog/interfaces/task-list/. style.css from its Reactive CSS divider; the layout above it and the shared api.css run but are not shown.
Tabs selected by click or arrow keys, with the ARIA tab pattern written from one state.
Each item opens and closes on its own, and its button reports the state with aria-expanded.
A menu that opens on click and closes on Escape, on a choice or on a click anywhere else.