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
|
|
@ -105,6 +105,65 @@
|
|||
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
|
||||
</div>
|
||||
|
||||
{# Options-page-only styles, INLINE on purpose: this admin page does NOT load the
|
||||
theme's css/plain.css (that is registered for survey pages only), so anything
|
||||
styled from plain.css would be unstyled here. These rules cover the
|
||||
navbarfontcolor working example (row 115-118): the preset swatch chips under
|
||||
the dropdown (full column width, 10px gap, hex label BELOW each swatch) and
|
||||
the grayed-out look of "disable"-mode children (visible but dimmed). #}
|
||||
<style>
|
||||
.option-visibility-disable .mb-3 {
|
||||
opacity: 0.55;
|
||||
}
|
||||
.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.active {
|
||||
outline: 2px solid currentColor;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.color-chip:focus-visible {
|
||||
outline: 2px solid #0d6efd;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.color-chip-label {
|
||||
font-size: 0.65rem;
|
||||
color: #6c757d;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
{# If this is a survey-specific (or survey-group) settings page, offer full inheritance of the parent template #}
|
||||
{% if bInherit %}
|
||||
<div class="row" id="general_inherit_active">
|
||||
|
|
|
|||
Loading…
Reference in a new issue