fix(options): default choice in the color dropdown bold via a real <b> element

Row 126 marked the default choice with data-default="1" and bolded it via
CSS (select option[data-default="1"]), but not every browser applies
font-weight to <option> elements, so the entry could still render non-bold.
refreshLabels in options.js now wraps the default option's label (including
its live hex) in a real <b> element, on top of the CSS rule — bold in every
browser. Non-default options stay plain. OPTIONS_JS_TOKEN -> 20261126.9.
Verified: render tc=588 (served as options.js?v=20261126.9), jsdom 6/6 incl.
new pins (default option contains <b> with its label, color1 has no <b>),
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 15:59:46 +01:00
commit 920f0347c7

View file

@ -780,7 +780,17 @@ var ThemeOptions = function () {
var pk = presets[mode];
if (pk) {
var c = currentColor(pk);
op.text(c ? base + ' [' + c + ']' : base);
var label = c ? base + ' [' + c + ']' : base;
if (op.attr('data-default')) {
// row 129: the DEFAULT choice is bold — via a real <b> element
// (not every browser applies font-weight CSS to <option>),
// on top of the select option[data-default="1"] CSS rule
op.empty().append($('<b>').text(label));
} else {
op.text(label);
}
} else if (op.attr('data-default')) {
op.empty().append($('<b>').text(base));
}
});
};