From 17304d0ce39e696c3233c4a5d2f8a3a9b0a9f6f9 Mon Sep 17 00:00:00 2001 From: Trevor Burch Date: Fri, 20 Dec 2024 14:47:13 -0500 Subject: [PATCH] fix(components/forms): styles do not output build warnings when utlizing checkboxes or radio buttons (#2957) [AB#3183368](https://dev.azure.com/blackbaud/f565481a-7bc9-4083-95d5-4f953da6d499/_workitems/edit/3183368) --- apps/playground/project.json | 8 ++++---- .../theme/src/lib/styles/themes/modern/_switch.scss | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/playground/project.json b/apps/playground/project.json index ed87fa44c0..7a2dfed179 100644 --- a/apps/playground/project.json +++ b/apps/playground/project.json @@ -44,13 +44,13 @@ "budgets": [ { "type": "initial", - "maximumWarning": "500kb", - "maximumError": "5mb" + "maximumWarning": "3mb", + "maximumError": "7mb" }, { "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "1mb" + "maximumWarning": "22kb", + "maximumError": "4mb" } ], "fileReplacements": [ diff --git a/libs/components/theme/src/lib/styles/themes/modern/_switch.scss b/libs/components/theme/src/lib/styles/themes/modern/_switch.scss index a7cfecdabf..9eb36eadc3 100644 --- a/libs/components/theme/src/lib/styles/themes/modern/_switch.scss +++ b/libs/components/theme/src/lib/styles/themes/modern/_switch.scss @@ -144,9 +144,9 @@ outline: none; } - &:not(:hover, :active, :focus-visible) { - &:checked:not(:disabled) + .sky-switch-control, - &[type='checkbox']:indeterminate:not(:disabled) + .sky-switch-control { + &:enabled:not(:hover):not(:active):not(:focus-visible) { + &:checked + .sky-switch-control, + &[type='checkbox']:indeterminate + .sky-switch-control { &.sky-switch-control-success { border-color: var( --sky-override-switch-border-color,