Skip to main content

max / makenotwork

Retire button.primary for real, in the stylesheet as well as the charter
Author: Max Johnson <me@maxj.phd> · 2026-08-02 21:58 UTC
Signed with PGP, not checked
Commit: b366d66b3617de43a87f136fa3d6e90021ae2596
Parent: 3517aaa
5 files changed, +30 insertions, -47 deletions
@@ -59,7 +59,7 @@
59 59
60 60 CONTROL MODIFIERS (compose onto buttons/inputs)
61 61 .small / .btn-compact / .btn-link / .btn-tiny button sizes
62 - .primary / .secondary / .danger / .saved button intents
62 + .btn-danger / .saved button intents
63 63 .input--xs / --sm / --mono / --upper / --numeric input sizes/shapes
64 64
65 65 FEATURE SUBAPPS (their own CSS scope)
@@ -1384,10 +1384,6 @@
1384 1384 justify-content: center;
1385 1385 }
1386 1386
1387 - .error-actions a.primary,
1388 - .error-actions a.secondary {
1389 - text-decoration: none;
1390 - }
1391 1387
1392 1388 /* Minimal direct-purchase page (templates/pages/buy.html). Standalone
1393 1389 page used for link-in-bio sharing, no site chrome, just a card.
@@ -9365,11 +9361,6 @@
9365 9361 object-fit: cover;
9366 9362 margin-bottom: var(--gap-pane);
9367 9363 }
9368 - .project-page .store-actions .secondary {
9369 - display: inline-block;
9370 - padding: var(--gap-peer) var(--gap-section);
9371 - text-decoration: none;
9372 - }
9373 9364 .project-page .follow-btn.is-selected {
9374 9365 opacity: 0.7;
9375 9366 }
@@ -10037,24 +10028,16 @@
10037 10028 text-decoration: none;
10038 10029 }
10039 10030
10040 - /* Active / inactive state for admin nav items and filter-bar toggles.
10041 - The admin templates toggle `.primary` (current page / active filter) and
10042 - `.secondary` (inactive) on these elements; style them to match the
10043 - monospace admin surface using the existing tokens. */
10044 - .admin-nav a.primary,
10045 - .filter-bar button.primary {
10046 - background: var(--primary-dark);
10047 - color: var(--primary-light);
10031 + /* Admin nav items and filter-bar toggles are .btn-primary / .btn-secondary,
10032 + toggled by the templates to mark the current page or active filter. Colour
10033 + and depth come from the button recipe; only the tighter admin metrics and
10034 + the active weight are stated here. */
10035 + .admin-nav a.btn-primary,
10036 + .filter-bar button.btn-primary {
10048 10037 font-weight: 700;
10049 10038 }
10050 - .admin-nav a.secondary,
10051 - .filter-bar button.secondary {
10052 - background: var(--surface-sunken);
10053 - color: var(--content-secondary);
10054 - cursor: pointer;
10055 - }
10056 - .admin-nav a.secondary:hover,
10057 - .filter-bar button.secondary:hover {
10039 + .admin-nav a.btn-secondary:hover,
10040 + .filter-bar button.btn-secondary:hover {
10058 10041 color: var(--content);
10059 10042 }
10060 10043
@@ -28,22 +28,22 @@
28 28
29 29 <div class="filter-bar">
30 30 <span class="label">Filter:</span>
31 - <button class="{% if current_filter.is_empty() %}primary{% else %}secondary{% endif %}"
31 + <button class="{% if current_filter.is_empty() %}btn-primary{% else %}btn-secondary{% endif %}"
32 32 hx-get="/admin/reports/entries"
33 33 hx-target="#reports-table"
34 34 hx-swap="innerHTML"
35 35 >All</button>
36 - <button class="{% if current_filter == "open" %}primary{% else %}secondary{% endif %}"
36 + <button class="{% if current_filter == "open" %}btn-primary{% else %}btn-secondary{% endif %}"
37 37 hx-get="/admin/reports/entries?status=open"
38 38 hx-target="#reports-table"
39 39 hx-swap="innerHTML"
40 40 >Open</button>
41 - <button class="{% if current_filter == "resolved" %}primary{% else %}secondary{% endif %}"
41 + <button class="{% if current_filter == "resolved" %}btn-primary{% else %}btn-secondary{% endif %}"
42 42 hx-get="/admin/reports/entries?status=resolved"
43 43 hx-target="#reports-table"
44 44 hx-swap="innerHTML"
45 45 >Resolved</button>
46 - <button class="{% if current_filter == "dismissed" %}primary{% else %}secondary{% endif %}"
46 + <button class="{% if current_filter == "dismissed" %}btn-primary{% else %}btn-secondary{% endif %}"
47 47 hx-get="/admin/reports/entries?status=dismissed"
48 48 hx-target="#reports-table"
49 49 hx-swap="innerHTML"
@@ -27,27 +27,27 @@
27 27
28 28 <div class="filter-bar">
29 29 <span class="label">Filter:</span>
30 - <button class="{% if current_filter.is_empty() %}primary{% else %}secondary{% endif %}"
30 + <button class="{% if current_filter.is_empty() %}btn-primary{% else %}btn-secondary{% endif %}"
31 31 hx-get="/admin/users/entries"
32 32 hx-target="#users-table"
33 33 hx-swap="innerHTML"
34 34 >All</button>
35 - <button class="{% if current_filter == "active" %}primary{% else %}secondary{% endif %}"
35 + <button class="{% if current_filter == "active" %}btn-primary{% else %}btn-secondary{% endif %}"
36 36 hx-get="/admin/users/entries?status=active"
37 37 hx-target="#users-table"
38 38 hx-swap="innerHTML"
39 39 >Active</button>
40 - <button class="{% if current_filter == "suspended" %}primary{% else %}secondary{% endif %}"
40 + <button class="{% if current_filter == "suspended" %}btn-primary{% else %}btn-secondary{% endif %}"
41 41 hx-get="/admin/users/entries?status=suspended"
42 42 hx-target="#users-table"
43 43 hx-swap="innerHTML"
44 44 >Suspended</button>
45 - <button class="{% if current_filter == "custom_pages" %}primary{% else %}secondary{% endif %}"
45 + <button class="{% if current_filter == "custom_pages" %}btn-primary{% else %}btn-secondary{% endif %}"
46 46 hx-get="/admin/users/entries?status=custom_pages"
47 47 hx-target="#users-table"
48 48 hx-swap="innerHTML"
49 49 >Custom page</button>
50 - <button class="{% if current_filter == "pages_locked" %}primary{% else %}secondary{% endif %}"
50 + <button class="{% if current_filter == "pages_locked" %}btn-primary{% else %}btn-secondary{% endif %}"
51 51 hx-get="/admin/users/entries?status=pages_locked"
52 52 hx-target="#users-table"
53 53 hx-swap="innerHTML"
@@ -48,22 +48,22 @@
48 48
49 49 <div class="filter-bar">
50 50 <span class="label">Filter:</span>
51 - <button class="{% if current_filter.is_empty() %}primary{% else %}secondary{% endif %}"
51 + <button class="{% if current_filter.is_empty() %}btn-primary{% else %}btn-secondary{% endif %}"
52 52 hx-get="/admin/waitlist/entries"
53 53 hx-target="#entries-table"
54 54 hx-swap="innerHTML"
55 55 >All</button>
56 - <button class="{% if current_filter == "pending" %}primary{% else %}secondary{% endif %}"
56 + <button class="{% if current_filter == "pending" %}btn-primary{% else %}btn-secondary{% endif %}"
57 57 hx-get="/admin/waitlist/entries?status=pending"
58 58 hx-target="#entries-table"
59 59 hx-swap="innerHTML"
60 60 >Pending</button>
61 - <button class="{% if current_filter == "approved" %}primary{% else %}secondary{% endif %}"
61 + <button class="{% if current_filter == "approved" %}btn-primary{% else %}btn-secondary{% endif %}"
62 62 hx-get="/admin/waitlist/entries?status=approved"
63 63 hx-target="#entries-table"
64 64 hx-swap="innerHTML"
65 65 >Approved</button>
66 - <button class="{% if current_filter == "spam" %}primary{% else %}secondary{% endif %}"
66 + <button class="{% if current_filter == "spam" %}btn-primary{% else %}btn-secondary{% endif %}"
67 67 hx-get="/admin/waitlist/entries?status=spam"
68 68 hx-target="#entries-table"
69 69 hx-swap="innerHTML"
@@ -1,10 +1,10 @@
1 1 <nav class="admin-nav">
2 - <a href="/admin/waitlist" class="{% if admin_active_page == "waitlist" %}primary{% else %}secondary{% endif %}">Waitlist</a>
3 - <a href="/admin/users" class="{% if admin_active_page == "users" %}primary{% else %}secondary{% endif %}">Users</a>
4 - <a href="/admin/uploads" class="{% if admin_active_page == "uploads" %}primary{% else %}secondary{% endif %}">Uploads</a>
5 - <a href="/admin/appeals" class="{% if admin_active_page == "appeals" %}primary{% else %}secondary{% endif %}">Appeals</a>
6 - <a href="/admin/reports" class="{% if admin_active_page == "reports" %}primary{% else %}secondary{% endif %}">Reports</a>
7 - <a href="/admin/signups" class="{% if admin_active_page == "signups" %}primary{% else %}secondary{% endif %}">Signups</a>
8 - <a href="/admin/metrics" class="{% if admin_active_page == "metrics" %}primary{% else %}secondary{% endif %}">Metrics</a>
9 - <a href="/admin/comp-codes" class="{% if admin_active_page == "comp-codes" %}primary{% else %}secondary{% endif %}">Comp codes</a>
2 + <a href="/admin/waitlist" class="{% if admin_active_page == "waitlist" %}btn-primary{% else %}btn-secondary{% endif %}">Waitlist</a>
3 + <a href="/admin/users" class="{% if admin_active_page == "users" %}btn-primary{% else %}btn-secondary{% endif %}">Users</a>
4 + <a href="/admin/uploads" class="{% if admin_active_page == "uploads" %}btn-primary{% else %}btn-secondary{% endif %}">Uploads</a>
5 + <a href="/admin/appeals" class="{% if admin_active_page == "appeals" %}btn-primary{% else %}btn-secondary{% endif %}">Appeals</a>
6 + <a href="/admin/reports" class="{% if admin_active_page == "reports" %}btn-primary{% else %}btn-secondary{% endif %}">Reports</a>
7 + <a href="/admin/signups" class="{% if admin_active_page == "signups" %}btn-primary{% else %}btn-secondary{% endif %}">Signups</a>
8 + <a href="/admin/metrics" class="{% if admin_active_page == "metrics" %}btn-primary{% else %}btn-secondary{% endif %}">Metrics</a>
9 + <a href="/admin/comp-codes" class="{% if admin_active_page == "comp-codes" %}btn-primary{% else %}btn-secondary{% endif %}">Comp codes</a>
10 10 </nav>