feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 | Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its value across saves (data-keep-value) so switching back to 'Other' restores the last picked color. Dropdown option labels show the live hex of each preset and clickable swatch chips select a preset; an effective-color swatch next to the picker shows the color actually applied. A legacy stored hex is migrated to mode 'other' + custom field (options.js) and accepted directly in custom_header.twig, so nothing is lost before a theme reset. Views map default->fontcolor, color1/2/3->primary/secondary/tertiarycolor, other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay plain colorpickers, default #ffffff. build.php maps a legacy hex navbarfontcolor in variant jsons to other+custom for when variants are built. Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration, gray-out, keep-value on save, chips, swatches), live survey render for all 5 modes, export check exit 0. NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no customer is waiting; the on-disk variant folders were left at their pre-feature state and no variant theme was reset. Run variants/build.php per variant only after the open prompts are done. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
7939f3de3f
commit
f2ebf24270
1 changed files with 263 additions and 16 deletions
|
|
@ -227,4 +227,47 @@ div.qvideo .question-valid-container {
|
|||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* Row 115: "disable" mode for parented options (navbarfontcolor working example) —
|
||||
the child stays visible but grayed out; swatch chips + effective-color swatch. */
|
||||
.option-visibility-disable .mb-3 {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.color-mode-chips {
|
||||
display: inline-flex;
|
||||
gap: 0.25rem;
|
||||
margin-left: 0.5rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.color-chip {
|
||||
width: 1.1rem;
|
||||
height: 1.1rem;
|
||||
padding: 0;
|
||||
border: 1px solid rgba(0, 0, 0, 0.35);
|
||||
border-radius: 0.25rem;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.color-chip.active {
|
||||
outline: 2px solid currentColor;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.color-chip:focus-visible {
|
||||
outline: 2px solid #0d6efd;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.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;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=plain.css.map */
|
||||
|
|
|
|||
Loading…
Reference in a new issue