From 5fe27fc72f6a4e0903542a9d5a3bd8a9b99d31e6 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Wed, 7 Oct 2026 09:09:20 -0400 Subject: [PATCH 1/4] thold: keep legend chips equal width using the longest label The Thold/Host/Log status legends used flex:1 1 0 with no shared minimum, so chips grew to unequal widths (and could clip their labels when tight). CSS can't measure the widest sibling, so the three legend renderers now compute the longest label and emit it as a --thold-chip-min CSS variable (calc(ch + 1.5rem)); every theme's .tholdLegendItem uses it as a shared min-width (falling back to max-content). All chips share one minimum, so they stay equal width as the legend wraps. Updated TholdLegendTest assertions to match the new container markup. --- CHANGELOG.md | 1 + css/classic.css | 1 + css/dark.css | 1 + css/deepness.css | 1 + css/midwinter.css | 1 + css/modern.css | 1 + css/paper-plane.css | 1 + css/paw.css | 1 + css/sunrise.css | 1 + includes/functions.php | 24 +++++++++++++++++++++--- tests/Unit/TholdLegendTest.php | 6 +++--- 11 files changed, 33 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c10e5a86..bf316b9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ --- develop --- * dev: Remove the inert COMPOSER_ROOT_VERSION env from the Pest CI step * feature: Restyle the Thold, Host status and Log status legends as rounded, evenly-spaced solid-colour chips for a clearer, more readable status key across every theme +* dev: Keep the status-legend chips equal width (sized to the longest label) as the legend wraps responsively * security: Add a version-safe CSP nonce (`plugin_thold_csp_nonce()`) to every inline `