diff --git a/.changeset/stupid-beers-travel.md b/.changeset/stupid-beers-travel.md new file mode 100644 index 0000000000..8ed2a550e6 --- /dev/null +++ b/.changeset/stupid-beers-travel.md @@ -0,0 +1,5 @@ +--- +"@frontify/fondue-components": patch +--- + +fix: remove hover state when switch is disabled and toggled diff --git a/packages/components/src/components/Switch/styles/switch.module.scss b/packages/components/src/components/Switch/styles/switch.module.scss index 98402c4064..672c7a686c 100644 --- a/packages/components/src/components/Switch/styles/switch.module.scss +++ b/packages/components/src/components/Switch/styles/switch.module.scss @@ -15,7 +15,7 @@ background-color: var(--box-neutral-color); border: 1px solid var(--line-color-x-strong); - &:hover { + &:enabled:hover { background-color: var(--box-neutral-color-hover); } @@ -37,12 +37,12 @@ &[data-state='checked'] { background-color: var(--text-color-weak); - &:hover { - background: var(--box-neutral-strong-color-hover); + &:enabled:hover { + background-color: var(--box-neutral-strong-color-hover); } } - &[disabled] { + &:disabled { border-color: var(--line-color); background-color: var(--box-neutral-color); @@ -51,6 +51,7 @@ } } } + .thumb { @include transition-transform;