css: replace admin-form-row/admin-label/admin-input/select/textarea classes with semantic selectors

Remove five presentational classes from admin forms and replace with
structural CSS selectors scoped to .admin-form:

- .admin-form-row  → .admin-form > div:not(.admin-submit-wrap)
  Grid layout (260px label col + 1fr input col) applied directly to div
  children of the form; submit-wrap div excluded via :not().

- .admin-label     → .admin-form > div:not(.admin-submit-wrap) > label
  Scoped to the direct label child of each form row div; does not bleed
  into nested checkbox labels inside .admin-checkbox-list.

- .admin-input / .admin-select / .admin-textarea
  → .admin-form input:not([type=checkbox|radio|file|hidden|submit])
  → .admin-form select
  → .admin-form textarea
  Also extended to .admin-inline-form input/select (tags page) so the
  tags table inputs retain identical base styling and focus colour.

Templates updated: add.php, edit.php, login.php, account.php,
pages-edit.php, import.php, tags.php,
templates/partials/form/jury-fieldset.php — all class= attributes for
the five removed classes stripped.

import.php: added 'admin-form' class alongside 'admin-import-area' so
its single file-input row gets the grid row treatment; submit div was
already using admin-submit-wrap so it is correctly excluded.

No visual change — selectors target the same elements as before.
This commit is contained in:
Pontoporeia
2026-04-02 12:42:49 +02:00
parent e9e012376d
commit c8a3cc0ff2
10 changed files with 164 additions and 155 deletions

View File

@@ -6,9 +6,9 @@
- [x] **`admin.css`**: Replace `.admin-main` with `.admin-body main` — only one `<main>` per page
- [x] **`admin.css`**: Replace `.admin-page-title` with `.admin-body main > h1` — always the first `h1` in `<main>`
- [x] **`admin.css`**: Replace `.admin-alert` / `.admin-alert--error` / `.admin-alert--success` with `[role="alert"]` or `.admin-body main > .alert` using `data-type="error|success"` attribute instead of modifier classes
- [ ] **`admin.css`**: Replace `.admin-form-row` with `.admin-body form > div` or `.admin-body form > .row` — form rows are always direct `<div>` children of `<form>`
- [ ] **`admin.css`**: Replace `.admin-label` with `.admin-body form label` — every label in admin forms
- [ ] **`admin.css`**: Replace `.admin-input` / `.admin-select` / `.admin-textarea` with `.admin-body form input[type="text"]`, `.admin-body form select`, `.admin-body form textarea` — leverage native element selectors
- [x] **`admin.css`**: Replace `.admin-form-row` with `.admin-form > div:not(.admin-submit-wrap)` — form rows are direct `<div>` children of `.admin-form`; excludes submit wrapper
- [x] **`admin.css`**: Replace `.admin-label` with `.admin-form > div:not(.admin-submit-wrap) > label` — every label in admin form rows
- [x] **`admin.css`**: Replace `.admin-input` / `.admin-select` / `.admin-textarea` with `.admin-form input:not([type=...])`, `.admin-form select`, `.admin-form textarea` — leverage native element selectors; extended to `.admin-inline-form` for tags table
- [x] **`admin.css`**: Replace `.admin-hint` with `.admin-body form small` — use `<small>` instead of `<p class="admin-hint">`
- [x] **`admin.css`**: Replace `.admin-table` with `.admin-body table` — only one table per admin page
- [x] **`admin.css`**: Replace `.admin-fieldset` / `.admin-fieldset-legend` with `.admin-body fieldset` / `.admin-body legend`