Toggle tasks and edit view settings via htmx
Task checkboxes post themselves (hx-post="?toggle=N") and flip back when the save fails, replacing tasks.js. View settings are a server-rendered form dialog with real radios and a select, replacing view-settings.js; with that, postReplace has no callers left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -241,6 +241,20 @@ footer {
|
||||
.danger { color: var(--danger); }
|
||||
.danger:hover { color: var(--danger-hover); }
|
||||
.btn.is-active { color: var(--primary-hover); }
|
||||
/* Segmented choice: radios styled as .btn toggles. The label is the button;
|
||||
the input stays in the accessibility tree and keyboard order. */
|
||||
.segmented input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
margin: 0;
|
||||
}
|
||||
.segmented .btn { position: relative; }
|
||||
.segmented .btn:has(input:checked) { color: var(--primary-hover); }
|
||||
.segmented .btn:has(input:focus-visible) { outline: 1px solid var(--secondary); }
|
||||
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
|
||||
legend { padding: 0; margin-bottom: var(--space-1); } /* not a flex item: .gap-* skips it */
|
||||
|
||||
/* === Form controls ===
|
||||
.input baseline is shared by search-input, modal inputs, and the editor
|
||||
|
||||
Reference in New Issue
Block a user