From dc27d63de5784fc4804475284090a23432f97a70 Mon Sep 17 00:00:00 2001 From: Tammo ter Hark Date: Thu, 26 Nov 2026 14:04:03 +0100 Subject: [PATCH] fix(options): keep navbarfontcolorcustom in column 2, full-width swatch chips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new navbarfontcolorcustom picker fell into the generic 'rest' slot of the Top-of-the-page layout, which opened a NEW col-md-4 — so the picker landed in column 3 next to the sticky checkboxes and left the divs unbalanced. Map the key to slot h2 so it stays in column 2 under the navbarfontcolor dropdown, rendered col-12 (full column width); column 3 is the sticky block again and the pane markup is balanced (89/89 divs). The swatch chips under the dropdown were tiny inline squares — make the chips row full column width with taller flex chips showing the hex value (options.js chip.text). OPTIONS_JS_TOKEN bumped to 20261126.2 (options.js changed). Layout pinned by jsdom assertions (picker in the same col-md-4 as the dropdown, wrapper col-12); suite 6/6, export 0. Variants intentionally not rebuilt (owner: deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- css/plain.css | 22 +++++++++++++++------- options/options.js | 1 + options/options.twig | 3 ++- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/css/plain.css b/css/plain.css index b2f0b92..2aaa40b 100644 --- a/css/plain.css +++ b/css/plain.css @@ -233,21 +233,29 @@ div.qvideo .question-valid-container { opacity: 0.55; } +/* Full column width: the chips row sits in its own block under the dropdown + (sel.after(chips) in options.js) and stretches to the column's full width. */ .color-mode-chips { - display: inline-flex; - gap: 0.25rem; - margin-left: 0.5rem; - vertical-align: middle; + display: flex; + width: 100%; + gap: 0.35rem; + margin-top: 0.4rem; } .color-chip { - width: 1.1rem; - height: 1.1rem; - padding: 0; + flex: 1 1 0; + height: 1.6rem; + padding: 0 0.2rem; border: 1px solid rgba(0, 0, 0, 0.35); border-radius: 0.25rem; cursor: pointer; background: transparent; + color: #fff; + text-shadow: 0 0 2px rgba(0, 0, 0, 0.8); + font-size: 0.65rem; + line-height: 1; + overflow: hidden; + white-space: nowrap; } .color-chip.active { diff --git a/options/options.js b/options/options.js index d357fe2..872c164 100644 --- a/options/options.js +++ b/options/options.js @@ -793,6 +793,7 @@ var ThemeOptions = function () { var mode = String(chip.data('mode')); var c = currentColor(presets[mode]); chip.css('background', c || 'transparent'); + chip.text(c || ''); chip.attr('title', mode + (c ? ' [' + c + ']' : '')); chip.attr('aria-label', chip.attr('title')); chip.toggleClass('active', String(sel.val()) === mode); diff --git a/options/options.twig b/options/options.twig index 345f2aa..fc889d8 100644 --- a/options/options.twig +++ b/options/options.twig @@ -43,7 +43,7 @@ heuristically cached copy (the file has only Last-Modified/ETag, no Cache-Control). Re-register it with a version token: bump OPTIONS_JS_TOKEN below whenever options/options.js changes, so every browser fetches the new file once. #} -{% set OPTIONS_JS_TOKEN = '20261126.1' %} +{% set OPTIONS_JS_TOKEN = '20261126.2' %} {{ unregisterScriptFile(optionsPath ~ '/options.js') }} {{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }} @@ -285,6 +285,7 @@ {% elseif key == 'headerbackgroundcolor' %}{% set fSlot = 'h1' %} {% elseif key == 'headerfont' %}{% set fSlot = 'hf' %} {% elseif key == 'navbarfontcolor' %}{% set fSlot = 'h2' %} + {% elseif key == 'navbarfontcolorcustom' %}{% set fSlot = 'h2' %} {% elseif key in aTopStickyKeys %}{% set fSlot = 'h3' %} {% elseif key == 'progressbarposition' %}{% set fSlot = 'ppos' %} {% elseif key == 'progressbarfont' %}{% set fSlot = 'pfont' %}