Dedupe menu admin CSS/markup, restore Mark Sold Out/Available labels
CSS redundancy cleanup on the online menu management feature: - .menu-category was a byte-for-byte duplicate of the existing .panel class (background/border/border-radius/padding); folds it into .panel's shared selector group instead, keeping only what's not shared (no margin-bottom, since these sit in a grid whose own gap already spaces them) - Several inline style="..." attributes were hand-copied verbatim between admin/menu.php's PHP template and admin/menu.js's client- side row/panel templates (price/sort/description cell formatting, category heading spacing, the empty-state row). Replaced with real CSS classes (.item-price-cell, .item-sort-cell, .item-desc-cell, .cat-name-heading, .cat-desc-text, .no-items-row td) so the styling lives in one place instead of two - class="font-mono" was referenced four times but never defined anywhere in CSS (silently doing nothing); it's now a real one-line utility, which also fixes two previously-dead uses of it already sitting in admin/index.php - .form-actions already existed as a class with its own margin-top, but every usage (two new modals here, plus a pre-existing one in admin/index.php) redundantly re-specified layout via inline style with a slightly different margin-top value each time; extended the shared class to own the whole pattern and dropped all three inline overrides - Removed a no-op `justify-content: flex-start` (the default value) from the new .admin-toolbar Caught and fixed a regression from the above before it shipped: removing the inline margin-bottom override on the category heading exposed that .panel h2's margin-bottom (from the existing panel styles) has higher specificity than a bare .cat-name-heading class, so the heading would have rendered with 5x the intended spacing. Rescoped as .category-panel .cat-name-heading to reliably win. Also restores the "Mark Sold Out" / "Mark Available" button wording (both directions of the toggle, in both the PHP-rendered rows and the two JS render paths) after it had been shortened to just "Sold Out" / "Available". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f1bbf59548
commit
50eeb41375
4 files changed
+182
-128
No files matched your search
+1
-1
@@ -176,7 +176,7 @@ $today = date('Y-m-d');
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions" style="display: flex; gap: 0.75rem; align-items: center;">
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Save Announcement</button>
|
||||
<a href="index.php" class="btn btn-outline">Cancel</a>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user