From b83d1dec9b4a02edd3246338a8c550ff2b79fdbf Mon Sep 17 00:00:00 2001 From: Maximilian Date: Fri, 5 May 2023 10:07:59 +0200 Subject: [PATCH 1/2] refactor: code simplification --- source/_patterns/01-elements/checkbox/checkbox.scss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/_patterns/01-elements/checkbox/checkbox.scss b/source/_patterns/01-elements/checkbox/checkbox.scss index 41e9e9f1ca..4751e36bba 100644 --- a/source/_patterns/01-elements/checkbox/checkbox.scss +++ b/source/_patterns/01-elements/checkbox/checkbox.scss @@ -36,13 +36,11 @@ } } - &:not(:disabled) { + &:enabled { &:hover { background-color: rgba(40, 45, 55, 0.14); - } - &:checked { - &:hover { + &:checked { background-color: $checkbox-hover-checked-backgroundColor; } } From f38b65a948f1a8687d638152d660ef3102011fa5 Mon Sep 17 00:00:00 2001 From: Maximilian Date: Fri, 5 May 2023 10:12:20 +0200 Subject: [PATCH 2/2] fix: background-color change on hover is only supposed work if unchecked and enabled --- source/_patterns/01-elements/radio/radio.scss | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/_patterns/01-elements/radio/radio.scss b/source/_patterns/01-elements/radio/radio.scss index b94e29dc92..e85bf7a6d9 100644 --- a/source/_patterns/01-elements/radio/radio.scss +++ b/source/_patterns/01-elements/radio/radio.scss @@ -23,12 +23,16 @@ vertical-align: sub; } - &:hover { - background-color: rgba(40, 45, 55, 0.14); - } + &:enabled { + &:hover { + &:not(:checked) { + background-color: rgba(40, 45, 55, 0.14); + } + } - &:active { - background-color: rgba(40, 45, 55, 0.3); + &:active { + background-color: rgba(40, 45, 55, 0.3); + } } &:checked {