diff --git a/ui/src/components.css b/ui/src/components.css index 5a0548714..a3a40cfa2 100644 --- a/ui/src/components.css +++ b/ui/src/components.css @@ -167,7 +167,7 @@ svg.lucide { flex: none; stroke-width: var(--isw); } .ss-sw.sm i { width: 12px; height: 12px; } .ss-sw.on i { background: var(--surface); } /* Some of the items it covers are on: half-tone track, centered knob with a dash. */ -.ss-sw.mix { justify-content: center; background: var(--ink-3); } +.ss-sw.mix { background: var(--ink-3); } .ss-sw.mix i { display: grid; place-items: center; } .ss-sw.mix i::after { content: ''; width: 8px; height: 2px; border-radius: 1px; background: var(--ink-3); } :root[data-theme="playful"] .ss-sw { width: 38px; height: 22px; background: var(--surface); border: 2px solid var(--line); padding: 2px; } @@ -707,11 +707,15 @@ button:disabled { cursor: not-allowed; } :root:not([data-theme="playful"]) .ss-counts>a:last-child { border-radius: 0 12px 12px 0; } :root[data-theme="playful"] .ss-counts>a:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); } .ss-sw { transition: background-color .15s; } -/* The knob slides rather than jumps: each distance is the track's inner width minus the knob's. */ +/* The knob slides rather than jumps: on moves it the track's inner width minus the knob's, mixed half + that. Mixed centers by transform too, so a change between any two states is one slide. */ .ss-sw i { transition: transform .15s cubic-bezier(.3,.7,.3,1), background-color .15s; } .ss-sw.on i { transform: translateX(14px); } .ss-sw.sm.on i { transform: translateX(12px); } :root[data-theme="playful"] .ss-sw.on i { transform: translateX(16px); } +.ss-sw.mix i { transform: translateX(7px); } +.ss-sw.sm.mix i { transform: translateX(6px); } +:root[data-theme="playful"] .ss-sw.mix i { transform: translateX(8px); } .ss-sw:disabled { opacity: .42; } .ss-chk-input:focus-visible + .ss-chk { outline: 2px solid var(--accent); outline-offset: 2px; } .ss-more { font-size: 13px; font-weight: 500; color: var(--accent); }