From c4d728445dd06e979275340141fba3bae9f0291e Mon Sep 17 00:00:00 2001 From: Tammo ter Hark Date: Sun, 29 Nov 2026 14:04:19 +0100 Subject: [PATCH] fix(options): 15px after the last checkbox of a checkbox group (.checkbox-last) The last checkbox of each consecutive checkbox run now gets the class checkbox-last, styled margin-bottom: 15px in the page style block (beats mb-1 by specificity), so there is 15px between a checkbox group (e.g. 'Make header sticky') and the following item. The 'Show logo on' boxes in the Logos row get it via loop.last. Inner checkbox spacing stays mb-1 (row 176). jsdom: new row-177 assertions, suite 8/8. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- options/options.twig | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/options/options.twig b/options/options.twig index 5ca8532..7946416 100644 --- a/options/options.twig +++ b/options/options.twig @@ -173,6 +173,12 @@ .action_update_options_string_form .form-label { font-size: 16px; } + /* row 177: 15px between the LAST checkbox of a checkbox group and the + following item (.checkbox-last is set in twig on the last checkbox of + each consecutive run; beats .mb-1 by specificity) */ + .form-check.checkbox-last { + margin-bottom: 15px; + } /* row 128/130: the section headers this page inserts (h2 inside the tab panes, e.g. "Header", "Logos", "Page background") — row 128 made them h1-sized, which turned out too big, so row 130 fixes them at 24px. @@ -401,6 +407,18 @@ {% endfor %} {% endif %} {% endif %} + {# row 177: keys of the LAST checkbox of each consecutive checkbox run in this + tab — its .form-check gets the extra class .checkbox-last (margin-bottom: + 15px, see the style block), so there is 15px between a checkbox group and + the following item #} + {% set aLastCheckboxKeys = [] %} + {% for ck in aTabKeys %} + {% set cka = aOptionAttributes.optionAttributes[ck] ?? null %} + {% if cka is not null and cka.type == 'checkbox' %} + {% set nka = aOptionAttributes.optionAttributes[aTabKeys[loop.index] ?? ''] ?? null %} + {% if nka is null or nka.type != 'checkbox' %}{% set aLastCheckboxKeys = aLastCheckboxKeys|merge([ck]) %}{% endif %} + {% endif %} + {% endfor %}
{% if tab.id == 'top-of-page' %} @@ -579,7 +597,7 @@ {% set ckey = pos ~ 'showon' ~ dev %} {% set cattr = aOptionAttributes.optionAttributes[ckey] %} {% set ccv = bGeneralInherit ? 'inherit' : (aCurrentOptions[ckey] is defined ? aCurrentOptions[ckey] : (oParentOptions[ckey] is defined ? oParentOptions[ckey] : '')) %} -
+
+ is then the same in every row of the page. Row 177: the LAST + checkbox of a run also gets .checkbox-last (margin-bottom 15px) + for the gap to the following item. #} +