fix(options): custom color picker group — equal-height parts, no third "effective" swatch

Row 143: the input group of a color-chooser's custom picker (shown when "Other
..." is chosen) had three parts and two problems:
1. The text input was lower than the swatch part (.input-group-text holding
   input[type=color], whose default height exceeds the form-control line box).
   Fixed in the inline <style> of options.twig: the color input is set to the
   same line box as .form-control (height: 1.5em), so swatch part and text
   input are both calc(1.5em + 0.75rem + 2px) tall.
2. The third part — the appended "effective color" swatch
   (.color-mode-effective) — is removed entirely (options.js refreshEffective /
   effectiveColor deleted, CSS rule deleted). The group is now just swatch +
   text input.
OPTIONS_JS_TOKEN -> 20261126.18. Verified: render tc=663 (no color-mode-effective
in the page, options.js?v=20261126.18), jsdom 7/7 incl. new pins (no third part
in the DOM at load or after mode changes; equal-height rule present; stale rule
gone), export exit 0. Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-26 20:09:56 +01:00
commit 02e9babe7c

View file

@ -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.17' %}
{% set OPTIONS_JS_TOKEN = '20261126.18' %}
{{ unregisterScriptFile(optionsPath ~ '/options.js') }}
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}
@ -176,14 +176,19 @@
.tab-content h2:not(.modal-title) {
font-size: 24px;
}
.color-mode-effective {
display: inline-block;
width: 1.1rem;
height: 1.1rem;
border: 1px solid rgba(0, 0, 0, 0.35);
border-radius: 0.25rem;
vertical-align: middle;
/* 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.) */
.input-group > .style__colorpicker input[type="color"] {
display: block;
width: 2.5em;
height: 1.5em;
padding: 0;
border: 0;
background: transparent;
cursor: pointer;
}
</style>