feat(options): show the default choice of a color-chooser in bold (data-default marker)
The 5 named color choices were already in the requested order (row 125):
Default font color | Default background color | Color 1 | Color 2 | Color 3
('Other…' stays as the 6th dropdown entry that opens the custom picker).
New: the option's default choice is now visually marked. config.xml marks
the default <option data-default="1"> of every color-chooser dropdown
(navbarfontcolor + the five <el>textcolor dropdowns); options.twig's inline
<style> renders those options bold (select option[data-default="1"]) and
options.js adds .is-default (bold) to the matching swatch label, reading the
default from the DOM so any future chooser gets it automatically. For
navbarfontcolor the default is 'default' = 'Same as default font color'.
OPTIONS_JS_TOKEN -> 20261126.8. Verified: render tc=588 (dropdown order
default,defaultbackgroundcolor,color1,color2,color3,other with
data-default on 'default'; served as options.js?v=20261126.8), jsdom 6/6
incl. 4 new row-126 pins, export_public.sh exit 0. No view changes, live
survey unaffected. Variants not rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
2f08e86335
commit
6300beaa88
1 changed files with 29 additions and 12 deletions
|
|
@ -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.7' %}
|
||||
{% set OPTIONS_JS_TOKEN = '20261126.8' %}
|
||||
{{ unregisterScriptFile(optionsPath ~ '/options.js') }}
|
||||
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}
|
||||
|
||||
|
|
@ -154,6 +154,16 @@
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
/* row 126: the DEFAULT choice of a color-chooser option (the config.xml
|
||||
<option data-default="1">) is shown in bold — in the dropdown (CSS below)
|
||||
and on its swatch label (is-default class set by options.js) */
|
||||
select option[data-default="1"] {
|
||||
font-weight: 700;
|
||||
}
|
||||
.color-chip-label.is-default {
|
||||
font-weight: 700;
|
||||
color: #212529;
|
||||
}
|
||||
.color-mode-effective {
|
||||
display: inline-block;
|
||||
width: 1.1rem;
|
||||
|
|
|
|||
Loading…
Reference in a new issue