fix(options): mark the default color choice with [ ] in the dropdown, not bold
Row 134: bolding <option> text is not rendered by every browser (native dropdown popups ignore it), so the default entry of a color-chooser dropdown is now enclosed in square brackets instead — e.g. "[Default font color] [#444444]". The brackets live in config.xml on the <option data-default="1"> (navbarfontcolor + the five <el>textcolor dropdowns), so they show even before JS runs; options.js strips and re-adds them idempotently while appending the live hexcode. Removed from the dropdown list: the <b> wrap (row 129), the inline font-weight (row 132), the CSS option[data-default] rule and the :has() closed-select rule. The bold REMAINS only on the swatch label below the swatch (.color-chip-label.is-default), where it renders reliably. OPTIONS_JS_TOKEN -> 20261126.13. Verified: render tc=618 (raw option "[Default font color]", served options.js?v=20261126.13), jsdom 6/6 incl. pins (label "[Default font color] [#444444]", no <b>/inline bold/stale CSS rules, non-default not bracketed, swatch label still bold), export exit 0. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
1b6ae85f83
commit
57c7009ec2
1 changed files with 35 additions and 46 deletions
26
config.xml
26
config.xml
|
|
@ -218,20 +218,22 @@
|
|||
navbarfontcolorcustom is rendered VISIBLE but grayed out (disabled)
|
||||
unless mode "other" (data-show-if-mode="disable" in options.twig) and
|
||||
keeps its value across saves (data-keep-value in options.js).
|
||||
PER-OPTION DEFAULT (row 125/126): every color-chooser dropdown can pick its
|
||||
own default value — the element text below IS that default (LimeSurvey
|
||||
PER-OPTION DEFAULT (row 125/126/134): every color-chooser dropdown can pick
|
||||
its own default value — the element text below IS that default (LimeSurvey
|
||||
stores it in the DB on theme reset), and the <option data-default="1">
|
||||
marks it so the options page can show it in BOLD (options.twig CSS +
|
||||
options.js swatch label). Here the default is "default" ("Default font
|
||||
color"); e.g. when questiontitlebackgroundcolor is later converted to
|
||||
this pattern, its default can be set to "color1".
|
||||
marks it. The default entry is enclosed in [ ] in the dropdown list
|
||||
(bolding <option> text is not rendered by every browser — row 134), and
|
||||
its swatch label below the swatch stays bold (options.js is-default).
|
||||
Here the default is "default" ("Default font color"); e.g. when
|
||||
questiontitlebackgroundcolor is later converted to this pattern, its
|
||||
default can be set to "color1".
|
||||
ROW 131: the option TEXTS are exactly "Default font color",
|
||||
"Default background color", "Color 1", "Color 2", "Color 3",
|
||||
"Other ..." — options.js appends each entry's live hexcode in brackets
|
||||
(for "Other ..." the custom color's hex) and bolds the default. -->
|
||||
<navbarfontcolor type="dropdown" category="Colors" width="12" title="Menu item color in header" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
|
||||
<dropdownoptions>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="default" data-default="1">[Default font color]</option>
|
||||
<option value="defaultbackgroundcolor">Default background color</option>
|
||||
<option value="color1">Color 1</option>
|
||||
<option value="color2">Color 2</option>
|
||||
|
|
@ -347,7 +349,7 @@
|
|||
<questiontitlefont type="fontselect" category="Questions" width="4" title="Font for question titles">base</questiontitlefont>
|
||||
<questiontitletextcolor type="dropdown" category="Questions" width="12" title="Text color for question titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="default" data-default="1">[Default font color]</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -356,7 +358,7 @@
|
|||
<answersfont type="fontselect" category="Questions" width="4" title="Font for answers and help texts">base</answersfont>
|
||||
<answerstextcolor type="dropdown" category="Questions" width="12" title="Text color for answers and help texts" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="default" data-default="1">[Default font color]</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -365,7 +367,7 @@
|
|||
<grouptitlefont type="fontselect" category="Questions" width="4" title="Font for group titles">base</grouptitlefont>
|
||||
<grouptitletextcolor type="dropdown" category="Questions" width="12" title="Text color for group titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="default" data-default="1">[Default font color]</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -374,7 +376,7 @@
|
|||
<groupdescriptionfont type="fontselect" category="Questions" width="4" title="Font for group descriptions">base</groupdescriptionfont>
|
||||
<groupdescriptiontextcolor type="dropdown" category="Questions" width="12" title="Text color for group descriptions" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="default" data-default="1">[Default font color]</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -383,7 +385,7 @@
|
|||
<buttonsfont type="fontselect" category="Questions" width="4" title="Font for the buttons (Previous/Next/Submit)">base</buttonsfont>
|
||||
<buttonstextcolor type="dropdown" category="Questions" width="12" title="Text color for the buttons (Previous/Next/Submit)" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="default" data-default="1">[Default font color]</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
|
|||
Loading…
Reference in a new issue