From 3a12bb6b7d7edb51fe3632972dbc31b07f565cb4 Mon Sep 17 00:00:00 2001 From: Tammo ter Hark Date: Thu, 26 Nov 2026 20:27:25 +0100 Subject: [PATCH] fix(options): make both parts of the custom color picker exactly equal height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting the height only on the inner input[type=color] (1.5em) did not equalize the bar in the real admin page. Now BOTH direct children of the picker input group — the swatch part (.style__colorpicker) and the text input (.selector__color-picker) — get the same explicit height calc(1.5rem + 0.75rem + 2px) (the .form-control line box incl. padding and border), with box-sizing: border-box. The selector specificity beats any framework .form-control / .input-group-text rule, so the equality holds regardless of which Bootstrap build wins on the admin page. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- options/options.twig | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/options/options.twig b/options/options.twig index e5a778c..d1c5414 100644 --- a/options/options.twig +++ b/options/options.twig @@ -176,11 +176,20 @@ .tab-content h2:not(.modal-title) { font-size: 24px; } - /* row 143: in the color picker input group the swatch part (.input-group-text - holding input[type=color]) must be exactly as high as the text input — set - the color input to the same line box (1.5em) as .form-control, so both parts - end up calc(1.5em + 0.75rem + 2px) tall. (The third part of the group, the - appended effective-color swatch, was removed — see options.js.) */ + /* row 143/145: in the color picker input group the swatch part (.input-group-text + holding input[type=color]) must be exactly as high as the text input. Setting + the height only on the inner color input was not enough in the real admin page, + so BOTH direct children of the group now get the same explicit height: + calc(1.5rem + 0.75rem + 2px) = the .form-control line box incl. padding and + border (specificity beats any framework .form-control/.input-group-text rule). + The swatch input keeps its own size, centered by the flex .input-group-text. + (The third part of the group, the appended effective-color swatch, was + removed — see options.js.) */ + .input-group > .style__colorpicker, + .input-group > .selector__color-picker { + height: calc(1.5rem + 0.75rem + 2px); + box-sizing: border-box; + } .input-group > .style__colorpicker input[type="color"] { display: block; width: 2.5em;