Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

feat(ui): optimize settings transitions, modernize toggles, and enhance card footer layout

Deepender25b98f157c6dab
diff --git a/src/components/ClipboardItem.tsx b/src/components/ClipboardItem.tsx
index a021535..846599f 100644
--- a/src/components/ClipboardItem.tsx
+++ b/src/components/ClipboardItem.tsx
@@ -302,16 +302,20 @@ const ClipboardItemBase = forwardRef<HTMLDivElement, Props>(({ item, timeTick =
<div className="item-footer">
<div className="meta">
<KindBadge item={item} />
- <span key={timeTick}>{relativeTime(item.capturedAt)}</span>
- {item.hitCount > 1 && <span>· ×{item.hitCount}</span>}
- {item.data.kind === 'image' && (
- <span>
- · {item.data.width}×{item.data.height}
- </span>
+ <ItemDetails item={item} />
+ {item.hitCount > 1 && (
+ <>
+ <span>·</span>
+ <span className="meta-hit-count" title={`Copied ${item.hitCount} times`}>
+ ×{item.hitCount}
+ </span>
+ </>
)}
- {item.data.kind === 'image' && <span>· {formatBytes(item.data.bytes)}</span>}
- {copied && <span style={{ color: '#fff' }}>· {t('item.copied')}</span>}
+ {copied && <span className="meta-copied">· {t('item.copied')}</span>}
</div>
+ <span className="meta-time" key={timeTick}>
+ {relativeTime(item.capturedAt)}
+ </span>
</div>
)}
</div>
@@ -930,6 +934,57 @@ function KindBadge({ item }: { item: ClipboardItemDto }) {
}
}
+function ItemDetails({ item }: { item: ClipboardItemDto }) {
+ switch (item.data.kind) {
+ case 'text': {
+ if (item.data.isUrl) {
+ let domain = ''
+ try {
+ const urlStr = item.data.text.startsWith('http://') || item.data.text.startsWith('https://')
+ ? item.data.text
+ : `https://${item.data.text}`
+ domain = new URL(urlStr).hostname.replace(/^www\./, '')
+ } catch {}
+ if (domain) {
+ return <span className="meta-detail">· {domain}</span>
+ }
+ return null
+ }
+
+ if (item.data.isColor) {
+ return <span className="meta-detail">· {item.data.text.trim()}</span>
+ }
+
+ return null
+ }
+
+ case 'image': {
+ const dims = item.data.width && item.data.height ? `${item.data.width}×${item.data.height}` : ''
+ const size = item.data.bytes ? formatBytes(item.data.bytes) : ''
+ return (
+ <>
+ {dims && <span className="meta-detail">· {dims}</span>}
+ {size && <span className="meta-detail">· {size}</span>}
+ </>
+ )
+ }
+
+ case 'image-collection': {
+ const totalBytes = item.data.images?.reduce((acc, img) => acc + (img.bytes || 0), 0) || 0
+ return totalBytes > 0 ? <span className="meta-detail">· {formatBytes(totalBytes)}</span> : null
+ }
+
+ case 'files': {
+ const entries = item.data.entries
+ const totalBytes = entries?.reduce((acc, e) => acc + (e.size || 0), 0) || 0
+ return totalBytes > 0 ? <span className="meta-detail">· {formatBytes(totalBytes)}</span> : null
+ }
+
+ default:
+ return null
+ }
+}
+
/**
* Memo comparator backed by a value-based render key: every `state:items`
* push recreates all DTO objects, so shallow identity compare would re-render
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index c2eaaf0..761fdf6 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -50,31 +50,43 @@ export function Header() {
const activeIndex = Math.max(0, FILTERS.findIndex((f) => f.id === activeId))
const ActiveIcon = FILTERS[activeIndex]?.Icon || FILTERS[0].Icon
const filterChipWidth = 28
+ const reduceMotion = !!settings.reduceMotion
+ const headerFade = `opacity ${reduceMotion ? '0.01s' : '0.16s'} ease`
return (
<div className="header" style={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center', height: 40, padding: '0 14px', boxSizing: 'border-box' }}>
- <div style={{ display: 'flex', alignItems: 'center', gap: 4, paddingLeft: 0, minWidth: 0, flex: 1, overflow: 'hidden' }}>
- {settingsOpen ? (
- <span style={{ fontSize: 13, fontWeight: 600, color: '#8e8e93', letterSpacing: '0.01em', paddingLeft: 0, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', maxWidth: 170 }}>
- {t('header.settings')}
- </span>
- ) : (
- <div
- className="filter-segmented-track"
- style={{
- position: 'relative',
- display: 'flex',
- alignItems: 'center',
- background: 'transparent',
- border: 'none',
- borderRadius: 999,
- padding: 0,
- gap: 4,
- marginLeft: 0,
- maxWidth: '100%',
- overflow: 'visible'
- }}
- >
+ <div
+ style={{
+ display: 'grid',
+ gridTemplate: '1fr / 1fr',
+ alignItems: 'center',
+ minWidth: 0,
+ flex: 1,
+ height: 28,
+ overflow: 'hidden'
+ }}
+ >
+ <div
+ className="filter-segmented-track"
+ aria-hidden={settingsOpen}
+ style={{
+ gridArea: '1 / 1 / 2 / 2',
+ position: 'relative',
+ display: 'flex',
+ alignItems: 'center',
+ background: 'transparent',
+ border: 'none',
+ borderRadius: 999,
+ padding: 0,
+ gap: 4,
+ marginLeft: 0,
+ maxWidth: '100%',
+ overflow: 'visible',
+ opacity: settingsOpen ? 0 : 1,
+ pointerEvents: settingsOpen ? 'none' : 'auto',
+ transition: headerFade
+ }}
+ >
{/* Single Persistent Sliding Pill Indicator (ABOVE the buttons) */}
<motion.div
initial={false}
@@ -118,6 +130,7 @@ export function Header() {
title={f.label}
aria-label={f.label}
aria-pressed={active}
+ tabIndex={settingsOpen ? -1 : 0}
onPointerEnter={() => {
if (f.id === 'emoji') void loadEmojiCatalog()
}}
@@ -149,8 +162,28 @@ export function Header() {
</button>
)
})}
- </div>
- )}
+ </div>
+ <span
+ aria-hidden={!settingsOpen}
+ style={{
+ gridArea: '1 / 1 / 2 / 2',
+ fontSize: 13,
+ fontWeight: 600,
+ color: '#8e8e93',
+ letterSpacing: '0.01em',
+ paddingLeft: 0,
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ maxWidth: 170,
+ lineHeight: '28px',
+ opacity: settingsOpen ? 1 : 0,
+ pointerEvents: 'none',
+ transition: headerFade
+ }}
+ >
+ {t('header.settings')}
+ </span>
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 4, flexShrink: 0, paddingRight: 2 }}>
@@ -235,7 +268,34 @@ export function Header() {
position: 'relative'
}}
>
- {settingsOpen ? <CloseIcon /> : <GearIcon />}
+ <span
+ aria-hidden={settingsOpen}
+ style={{
+ position: 'absolute',
+ inset: 0,
+ display: 'grid',
+ placeItems: 'center',
+ opacity: settingsOpen ? 0 : 1,
+ transition: headerFade,
+ pointerEvents: 'none'
+ }}
+ >
+ <GearIcon />
+ </span>
+ <span
+ aria-hidden={!settingsOpen}
+ style={{
+ position: 'absolute',
+ inset: 0,
+ display: 'grid',
+ placeItems: 'center',
+ opacity: settingsOpen ? 1 : 0,
+ transition: headerFade,
+ pointerEvents: 'none'
+ }}
+ >
+ <CloseIcon />
+ </span>
{!settingsOpen && (updateInfo?.downloaded || ((settings.autoUpdates ?? true) && updateInfo?.hasUpdate)) && (
<span
style={{
diff --git a/src/components/IndicatorStyleFlyout.tsx b/src/components/IndicatorStyleFlyout.tsx
index 5b37faa..f72d162 100644
--- a/src/components/IndicatorStyleFlyout.tsx
+++ b/src/components/IndicatorStyleFlyout.tsx
@@ -161,7 +161,7 @@ export function IndicatorStyleFlyout({ isRight }: { isRight: boolean }) {
patch({ copyIndicatorStyle: 'logo' })
useStore.getState().triggerCopyFlare()
}}
- preview={<LiquidOctopusLoader fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" speed={1.2} />}
+ preview={<LiquidOctopusLoader fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" speed={1.2} active={true} />}
title={t('appearance.logoStyle')}
/>
diff --git a/src/components/LiquidOctopusLoader.tsx b/src/components/LiquidOctopusLoader.tsx
index a0887e4..0bbeb85 100644
--- a/src/components/LiquidOctopusLoader.tsx
+++ b/src/components/LiquidOctopusLoader.tsx
@@ -21,11 +21,9 @@ export function LiquidOctopusLoader({
}: LiquidLoaderProps) {
const octoRef = useRef<SVGPathElement | null>(null)
- const open = useStore((s) => s.open)
const copyFlareActive = useStore((s) => s.copyFlareActive)
- const settingsOpen = useStore((s) => s.settingsOpen)
- const isAnimating = active ?? (open || copyFlareActive || settingsOpen)
+ const isAnimating = active ?? copyFlareActive
// Octopus path dimensions & center coordinates
const bounds = useMemo(() => {
diff --git a/src/components/Panel.tsx b/src/components/Panel.tsx
index 459bb9d..d7b546f 100644
--- a/src/components/Panel.tsx
+++ b/src/components/Panel.tsx
@@ -352,83 +352,91 @@ export function Panel() {
<ToastStack />
<div style={{ flex: 1, display: 'grid', gridTemplate: '1fr / 1fr', overflow: 'hidden', position: 'relative' }}>
- <AnimatePresence initial={false}>
- {settingsOpen ? (
+ {/* Main clipboard / emoji view (persistent so ItemList is never torn down and doesn't jump on Y-axis) */}
+ <div
+ style={{
+ gridArea: '1 / 1 / 2 / 2',
+ display: 'flex',
+ flexDirection: 'column',
+ overflow: 'hidden',
+ position: 'relative',
+ opacity: settingsOpen ? 0 : 1,
+ visibility: settingsOpen ? 'hidden' : 'visible',
+ pointerEvents: settingsOpen ? 'none' : 'auto',
+ transition: `opacity ${settings.reduceMotion ? '0.01s' : '0.16s'} ease, visibility ${settings.reduceMotion ? '0.01s' : '0.16s'} ease`
+ }}
+ aria-hidden={settingsOpen}
+ >
+ <div style={{ flex: 1, minHeight: 0, display: 'grid', gridTemplate: '1fr / 1fr', overflow: 'hidden' }}>
+ <div
+ style={{
+ gridArea: '1 / 1 / 2 / 2',
+ display: emojiOpen ? 'none' : 'flex',
+ flexDirection: 'column',
+ minHeight: 0,
+ height: '100%',
+ overflow: 'hidden'
+ }}
+ aria-hidden={emojiOpen}
+ >
+ <ItemList />
+ </div>
+ <div
+ style={{
+ gridArea: '1 / 1 / 2 / 2',
+ display: emojiOpen ? 'flex' : 'none',
+ flexDirection: 'column',
+ minHeight: 0,
+ height: '100%',
+ overflow: 'hidden'
+ }}
+ aria-hidden={!emojiOpen}
+ >
+ {emojiMounted ? <EmojiPicker active={emojiOpen} /> : null}
+ </div>
+ </div>
+ <div className="footer" style={{ position: 'relative' }}>
+ {!emojiOpen && (
+ <>
+ <div className="footer-capsule">
+ <span className="footer-capsule-count" title={`${filteredCount}`}>
+ {filteredCount}
+ </span>
+ </div>
+ <div className="spacer" />
+ <ClearMenu
+ items={filteredItems}
+ disabled={recent.length === 0}
+ panelOpen={open}
+ onClear={(ids) => clear(ids)}
+ onClearAll={() => {
+ if (typeFilter === 'all' && !query.trim()) {
+ clear()
+ } else {
+ clear(recent.map((it) => it.id))
+ }
+ }}
+ />
+ </>
+ )}
+ </div>
+ </div>
+
+ {/* Settings view */}
+ <AnimatePresence>
+ {settingsOpen && (
<motion.div
key="settings"
- initial={{ opacity: 1, x: isRight ? -8 : 8 }}
+ initial={{ opacity: 0, x: isRight ? -8 : 8 }}
animate={{ opacity: 1, x: 0 }}
exit={{ opacity: 0, x: isRight ? 8 : -8 }}
- transition={{ type: 'spring', stiffness: 500, damping: 32, mass: 0.5 }}
+ transition={settings.reduceMotion ? { duration: 0.01 } : { type: 'spring', stiffness: 500, damping: 32, mass: 0.5 }}
style={{ gridArea: '1 / 1 / 2 / 2', display: 'flex', flexDirection: 'column', overflow: 'hidden', position: 'relative' }}
>
<Settings />
</motion.div>
- ) : (
- <motion.div
- key="main"
- initial={{ opacity: 0, y: -8 }}
- animate={{ opacity: 1, y: 0 }}
- exit={{ opacity: 0, y: 8 }}
- transition={{ type: 'spring', stiffness: 500, damping: 32, mass: 0.5 }}
- style={{ gridArea: '1 / 1 / 2 / 2', display: 'flex', flexDirection: 'column', overflow: 'hidden', position: 'relative' }}
- >
- <div style={{ flex: 1, minHeight: 0, display: 'grid', gridTemplate: '1fr / 1fr', overflow: 'hidden' }}>
- <div
- style={{
- gridArea: '1 / 1 / 2 / 2',
- display: emojiOpen ? 'none' : 'flex',
- flexDirection: 'column',
- minHeight: 0,
- height: '100%',
- overflow: 'hidden'
- }}
- aria-hidden={emojiOpen}
- >
- <ItemList />
- </div>
- <div
- style={{
- gridArea: '1 / 1 / 2 / 2',
- display: emojiOpen ? 'flex' : 'none',
- flexDirection: 'column',
- minHeight: 0,
- height: '100%',
- overflow: 'hidden'
- }}
- aria-hidden={!emojiOpen}
- >
- {emojiMounted ? <EmojiPicker active={emojiOpen} /> : null}
- </div>
- </div>
- <div className="footer" style={{ position: 'relative' }}>
- {!emojiOpen && (
- <>
- <div className="footer-capsule">
- <span className="footer-capsule-count" title={`${filteredCount}`}>
- {filteredCount}
- </span>
- </div>
- <div className="spacer" />
- <ClearMenu
- items={filteredItems}
- disabled={recent.length === 0}
- panelOpen={open}
- onClear={(ids) => clear(ids)}
- onClearAll={() => {
- if (typeFilter === 'all' && !query.trim()) {
- clear()
- } else {
- clear(recent.map((it) => it.id))
- }
- }}
- />
- </>
- )}
- </div>
- </motion.div>
- )}
- </AnimatePresence>
+ )}
+ </AnimatePresence>
</div>
<DropOverlay />
<SplitDropZone isRight={isRight} />
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index b0083c4..f819cfc 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -68,14 +68,24 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
const [displays, setDisplays] = useState<DisplayInfo[]>([])
useEffect(() => {
- window.edge.getDisplays().then(setDisplays).catch(() => {})
+ const timer = window.setTimeout(() => {
+ window.edge.getDisplays().then(setDisplays).catch(() => {})
+ }, 250)
+ return () => window.clearTimeout(timer)
}, [])
useEffect(() => {
- const pull = () => { void useStore.getState().refreshLaunchAtLogin() }
- pull()
- const timer = window.setInterval(pull, 2000)
- return () => window.clearInterval(timer)
+ let timer: number
+ const pullTimer = window.setTimeout(() => {
+ void useStore.getState().refreshLaunchAtLogin()
+ timer = window.setInterval(() => {
+ void useStore.getState().refreshLaunchAtLogin()
+ }, 2000)
+ }, 300)
+ return () => {
+ window.clearTimeout(pullTimer)
+ if (timer) window.clearInterval(timer)
+ }
}, [])
const updateDownloaded = updateInfo?.downloaded ? { version: updateInfo.latestVersion } : null
@@ -1170,7 +1180,7 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
}}
>
<div style={{ height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
- <LiquidOctopusLoader fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" speed={1.2} />
+ <LiquidOctopusLoader fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" speed={1.2} active={true} />
</div>
<div style={{ fontSize: 12, fontWeight: 600, color: '#ffffff' }}>{t('appearance.logoStyle')}</div>
</div>
@@ -1349,6 +1359,8 @@ function Toggle({
onChange: (v: boolean) => void
disabled?: boolean
}) {
+ const [isHovered, setIsHovered] = useState(false)
+
return (
<button
type="button"
@@ -1356,6 +1368,8 @@ function Toggle({
role="switch"
aria-checked={checked}
disabled={disabled}
+ onMouseEnter={() => setIsHovered(true)}
+ onMouseLeave={() => setIsHovered(false)}
onClick={() => {
if (disabled) return
playToggleSound(!checked)
@@ -1363,40 +1377,48 @@ function Toggle({
}}
style={{
flexShrink: 0,
- width: 38,
- height: 22,
+ width: 36,
+ height: 20,
borderRadius: 999,
- background: disabled ? 'rgba(255, 255, 255, 0.05)' : checked ? '#ffffff' : 'rgba(255, 255, 255, 0.12)',
- border: disabled ? '1px solid rgba(255, 255, 255, 0.08)' : checked ? '1px solid #ffffff' : '1px solid rgba(255, 255, 255, 0.18)',
+ background: disabled
+ ? 'rgba(255, 255, 255, 0.05)'
+ : checked
+ ? '#ffffff'
+ : isHovered
+ ? 'rgba(255, 255, 255, 0.18)'
+ : 'rgba(255, 255, 255, 0.12)',
+ border: 'none',
position: 'relative',
cursor: disabled ? 'not-allowed' : 'pointer',
padding: 0,
outline: 'none',
- transition: 'background 0.22s ease, border-color 0.22s ease',
- boxShadow: !disabled && checked ? '0 0 12px rgba(255, 255, 255, 0.25)' : 'none',
- opacity: disabled ? 0.45 : 1
+ transition: 'background 0.18s ease, opacity 0.18s ease',
+ boxShadow: 'none',
+ opacity: disabled ? 0.38 : 1
}}
>
<motion.span
className="toggle-thumb"
initial={false}
animate={{
- x: checked ? 18 : 2,
+ x: checked ? 19 : 3,
backgroundColor: checked ? '#000000' : '#ffffff'
}}
transition={{
type: 'spring',
- stiffness: 600,
- damping: 35
+ stiffness: 520,
+ damping: 32,
+ mass: 0.5
}}
style={{
position: 'absolute',
- top: 2,
+ top: 3,
left: 0,
- width: 16,
- height: 16,
+ width: 14,
+ height: 14,
borderRadius: '50%',
- boxShadow: '0 1.5px 4px rgba(0, 0, 0, 0.4)'
+ boxShadow: 'none',
+ pointerEvents: 'none'
}}
/>
</button>
diff --git a/src/styles/item.css b/src/styles/item.css
index 08c398f..f89cac2 100644
--- a/src/styles/item.css
+++ b/src/styles/item.css
@@ -17,6 +17,37 @@
overflow: hidden;
}
+/* Specular light-reflection 1px border.
+ Zero-mask hardware-accelerated: 1px specular top highlight centered at 50%
+ that dissolves before reaching corners, paired with a subtle 1px bottom rim. */
+.item::before {
+ content: '';
+ position: absolute;
+ inset: 0;
+ border-radius: inherit;
+ pointer-events: none;
+ z-index: 2;
+ transition: opacity 0.14s ease;
+ background:
+ radial-gradient(
+ ellipse 70% 1px at 50% 0%,
+ rgba(255, 255, 255, 0.22) 0%,
+ rgba(255, 255, 255, 0.08) 45%,
+ transparent 80%
+ ) top / 100% 1px no-repeat,
+ linear-gradient(
+ 90deg,
+ transparent 0%,
+ rgba(255, 255, 255, 0.035) 20%,
+ rgba(255, 255, 255, 0.035) 80%,
+ transparent 100%
+ ) bottom / 100% 1px no-repeat;
+}
+
+.item:hover::before {
+ opacity: 1.2;
+}
+
/* Performance culling — invisible to users.
Cards outside the scroll viewport skip style/layout/paint of their whole
subtree; scrolling near them renders them normally. The `auto` keyword
@@ -101,6 +132,7 @@
display: flex;
align-items: center;
justify-content: space-between;
+ gap: 8px;
margin-top: auto;
}
@@ -128,8 +160,12 @@
.meta {
display: flex;
align-items: center;
- flex-wrap: wrap;
- gap: 7px;
+ flex-wrap: nowrap;
+ gap: 5px;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
font-family: var(--font-ui);
font-size: calc(11px * var(--font-scale, 1));
color: rgba(255, 255, 255, 0.48);
@@ -137,6 +173,40 @@
letter-spacing: 0.01em;
}
+.meta .meta-detail {
+ white-space: nowrap;
+}
+
+.meta-hit-count {
+ white-space: nowrap;
+ font-size: calc(10.5px * var(--font-scale, 1));
+ font-weight: 600;
+ color: rgba(255, 255, 255, 0.7);
+ background: rgba(255, 255, 255, 0.08);
+ padding: 0.5px 4.5px;
+ border-radius: 4px;
+ letter-spacing: 0.02em;
+}
+
+.meta-copied {
+ white-space: nowrap;
+ font-weight: 600;
+ color: #ffffff;
+}
+
+.meta-time {
+ margin-left: auto;
+ white-space: nowrap;
+ flex-shrink: 0;
+ font-family: var(--font-ui);
+ font-size: calc(11px * var(--font-scale, 1));
+ color: rgba(255, 255, 255, 0.4);
+ font-weight: 500;
+ letter-spacing: 0.01em;
+ text-align: right;
+ padding-left: 6px;
+}
+
/* Scroll to top button */
.scroll-top-btn {
position: fixed;
@@ -567,7 +637,35 @@
}
.fluid-card-row:hover {
- background: #141414;
+ background: #1c1c1c;
+}
+
+.fluid-card-row::before {
+ content: '';
+ position: absolute;
+ inset: 0;
+ border-radius: inherit;
+ pointer-events: none;
+ z-index: 2;
+ transition: opacity 0.14s ease;
+ background:
+ radial-gradient(
+ ellipse 70% 1px at 50% 0%,
+ rgba(255, 255, 255, 0.22) 0%,
+ rgba(255, 255, 255, 0.08) 45%,
+ transparent 80%
+ ) top / 100% 1px no-repeat,
+ linear-gradient(
+ 90deg,
+ transparent 0%,
+ rgba(255, 255, 255, 0.035) 20%,
+ rgba(255, 255, 255, 0.035) 80%,
+ transparent 100%
+ ) bottom / 100% 1px no-repeat;
+}
+
+.fluid-card-row:hover::before {
+ opacity: 1.2;
}
.fluid-card-row:active {
diff --git a/src/styles/settings.css b/src/styles/settings.css
index cb33433..95bb00a 100644
--- a/src/styles/settings.css
+++ b/src/styles/settings.css
@@ -361,38 +361,48 @@
opacity: 0.7;
}
-/* Sleek Minimalist Toggle Switch */
+/* Modern Flat Toggle Switch */
.setting-toggle {
flex-shrink: 0;
- width: 40px;
- height: 24px;
+ width: 36px;
+ height: 20px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.12);
- border: 1px solid rgba(255, 255, 255, 0.18);
+ border: none;
position: relative;
cursor: pointer;
padding: 0;
- transition: background 0.2s ease, border-color 0.2s ease;
+ outline: none;
+ transition: background 0.18s ease, opacity 0.18s ease;
+ box-shadow: none;
+}
+
+.setting-toggle:hover:not(:disabled) {
+ background: rgba(255, 255, 255, 0.18);
}
.toggle-thumb {
position: absolute;
top: 3px;
- left: 3px;
- width: 16px;
- height: 16px;
+ left: 0;
+ width: 14px;
+ height: 14px;
border-radius: 50%;
- background: #d4d4d8;
- transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
+ background: #ffffff;
+ box-shadow: none;
+ pointer-events: none;
}
.setting-toggle.checked {
background: #ffffff;
- border-color: #ffffff;
+ border: none;
+}
+
+.setting-toggle.checked:hover:not(:disabled) {
+ background: #ffffff;
}
.setting-toggle.checked .toggle-thumb {
- transform: translateX(16px);
background: #000000;
}