fix(options): move options-page chip styles inline into options.twig
The admin options page (themeOptions/update) does NOT load the theme's css/plain.css — that file is registered for survey pages only — so the swatch chip styles added there never applied on the options page: with the new JS (hex label element) but old/absent CSS the swatches collapsed to tiny buttons with the hex beside them. The chip/disable-mode styles are options-page-only UI, so they now live in an inline <style> block in options/options.twig (always rendered with the page, twig auto_reload — no asset cache involved) and were removed from css/plain.css (sass source kept in sync). No options.js change, so OPTIONS_JS_TOKEN stays 20261126.3. jsdom test now asserts gap:10px and the column layout against the inline <style>; suite 6/6, export 0. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
f2316d1a5d
commit
75ff90ab85
1 changed files with 62 additions and 63 deletions
|
|
@ -227,68 +227,8 @@ 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;
|
||||
}
|
||||
|
||||
/* 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.
|
||||
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: 10px;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
|
||||
.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;
|
||||
border: 1px solid rgba(0, 0, 0, 0.35);
|
||||
border-radius: 0.25rem;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.color-chip-label {
|
||||
font-size: 0.65rem;
|
||||
color: #6c757d;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
/* NOTE: the swatch-chip / disable-mode styles for the options page live INLINE in
|
||||
options/options.twig (<style> block) — the admin options page does not load
|
||||
css/plain.css, so they would not apply from here (rows 117-119). */
|
||||
|
||||
/*# sourceMappingURL=plain.css.map */
|
||||
|
|
|
|||
Loading…
Reference in a new issue