diff --git a/css/plain.css b/css/plain.css
index 2aaa40b..1f0400b 100644
--- a/css/plain.css
+++ b/css/plain.css
@@ -234,28 +234,41 @@ div.qvideo .question-valid-container {
}
/* 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. */
+ (sel.after(chips) in options.js) and stretches to the column's full width.
+ 10px between the swatches so they stand out; the hex value sits BELOW each
+ swatch in .color-chip-label (inside the swatch it was unreadable). */
.color-mode-chips {
display: flex;
width: 100%;
- gap: 0.35rem;
+ gap: 10px;
margin-top: 0.4rem;
}
-.color-chip {
+.color-chip-item {
flex: 1 1 0;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+}
+
+.color-chip {
+ width: 100%;
height: 1.6rem;
- padding: 0 0.2rem;
+ padding: 0;
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);
+}
+
+.color-chip-label {
font-size: 0.65rem;
- line-height: 1;
- overflow: hidden;
+ color: #6c757d;
+ text-align: center;
white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.color-chip.active {
diff --git a/options/options.js b/options/options.js
index 872c164..7e9ad0f 100644
--- a/options/options.js
+++ b/options/options.js
@@ -783,9 +783,14 @@ var ThemeOptions = function () {
sel.after(chips);
sel.data('color-chips', chips);
$.each(presets, function (mode, key) {
- var chip = $('');
+ // per preset: a swatch button with the hex value BELOW it
+ // (the hex inside the swatch was unreadable and obscured the color)
+ var item = $('');
+ var chip = $('');
+ var lbl = $('');
chip.on('click', function () { sel.val(mode).trigger('change'); });
- chips.append(chip);
+ item.append(chip).append(lbl);
+ chips.append(item);
});
}
chips.find('.color-chip').each(function () {
@@ -793,10 +798,10 @@ 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);
+ chip.siblings('.color-chip-label').first().text(c || '');
});
};
var refreshEffective = function () {
diff --git a/options/options.twig b/options/options.twig
index fc889d8..44ce569 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.2' %}
+{% set OPTIONS_JS_TOKEN = '20261126.3' %}
{{ unregisterScriptFile(optionsPath ~ '/options.js') }}
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}
@@ -524,7 +524,8 @@
+ {% if attr.parent != '' %}data-parent="{{ attr.parent }}"{% endif %}
+ class="selector__colorpicker-inherit-value{% if attr.parent != '' %} selector_radio_childfield{% endif %}"/>