From 14d248ebaf4d1cb9f90573ce9e652374902d28c4 Mon Sep 17 00:00:00 2001 From: Jay Harris Date: Fri, 30 Aug 2024 08:48:51 +1200 Subject: [PATCH] [Toggle]: Add focus shadow (#805) --- src/components/toggle/toggle.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/toggle/toggle.svelte b/src/components/toggle/toggle.svelte index d492f7e28..478d7fd4d 100644 --- a/src/components/toggle/toggle.svelte +++ b/src/components/toggle/toggle.svelte @@ -159,7 +159,7 @@ height: calc(var(--height) - 2 * var(--padding)); border-radius: var(--leo-radius-full); padding: var(--padding); - transition: background-color var(--duration) ease-in-out; + transition: background-color var(--duration) ease-in-out, box-shadow var(--duration) ease-in-out; flex-shrink: 0; &:disabled { @@ -170,6 +170,10 @@ } } + &:focus-visible { + box-shadow: var(--leo-effect-focus-state-offset); + } + &:hover:not(:disabled) { --hover-bg: var(--unchecked-color);