diff --git a/options/options.js b/options/options.js index ce6d7e1..9847988 100644 --- a/options/options.js +++ b/options/options.js @@ -771,19 +771,12 @@ var ThemeOptions = function () { || sel.find('option').not('[value="inherit"]').first().attr('value') || ''); var customInput = globalForm.find('input[name="' + key + 'custom"]'); - var rowLabel = String(sel.closest('.mb-3').find('.form-label').first().text() || key); var currentColor = function (ckey) { var f = globalForm.find('#simple_edit_options_' + ckey); var v = f.val(); if (!v) { v = f.data('inheritvalue'); } return v ? String(v) : ''; }; - var effectiveColor = function () { - var mode = String(sel.val()); - if (mode === 'other') { return customInput.length && customInput.val() ? String(customInput.val()) : ''; } - var pk = presets[mode]; - return pk ? currentColor(pk) : ''; - }; var refreshLabels = function () { sel.find('option').each(function () { var op = $(this); @@ -847,19 +840,10 @@ var ThemeOptions = function () { .toggleClass('is-default', defaultMode !== '' && mode === defaultMode); }); }; - var refreshEffective = function () { - var group = customInput.closest('.input-group'); - if (!group.length) { return; } - var sw = group.find('.color-mode-effective'); - if (!sw.length) { - sw = $(''); - group.append($('
').append(sw)); - } - var c = effectiveColor(); - sw.css('background', c || 'transparent'); - sw.attr('title', c ? 'Effective color (' + rowLabel + '): ' + c : 'Effective color (' + rowLabel + '): (none)'); - }; - var refreshAll = function () { refreshLabels(); refreshChips(); refreshEffective(); }; + // row 143: NO third part in the input group any more — the "effective color" + // swatch (.color-mode-effective) is removed; the group is just the swatch + // part + the text input, both the same height (CSS in options.twig) + var refreshAll = function () { refreshLabels(); refreshChips(); }; colorModeRefreshers.push(refreshAll); // legacy migration: stored hex (pre-dropdown value) -> mode "other" + hex into the custom field var stored = legacyColorValues[key]; diff --git a/options/options.twig b/options/options.twig index 4717680..ea318e6 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.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; }