From 14d16ae8232a3d0653073e9d7f06e59c6fad83ef Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Thu, 19 Dec 2024 11:48:22 +0000 Subject: [PATCH] Remove now-unneeded focus-visible backwards compat --- client/scss/components/_dropdown-button.scss | 10 ---------- client/scss/components/_form-side.scss | 7 ------- client/scss/components/forms/_switch.scss | 6 ------ client/scss/overrides/_utilities.focus.scss | 9 --------- 4 files changed, 32 deletions(-) diff --git a/client/scss/components/_dropdown-button.scss b/client/scss/components/_dropdown-button.scss index 63b60c4504..5f21d2d319 100644 --- a/client/scss/components/_dropdown-button.scss +++ b/client/scss/components/_dropdown-button.scss @@ -26,16 +26,6 @@ $radius: theme('borderRadius.sm'); width: 100%; } - @supports not selector(:has(*)) { - // Use no corner radius and always-on borders if `:has` is not supported. - --primary-button-radius-top: 0; - --primary-button-radius-bottom: 0; - --toggle-button-radius-top: 0; - --toggle-button-radius-bottom: 0; - --first-item-border-top: #{$separator}; - --last-item-border-top: #{$separator}; - } - &:has(:not([hidden]) > [data-placement^='bottom']) { --primary-button-radius-top: #{$radius}; --primary-button-radius-bottom: 0; diff --git a/client/scss/components/_form-side.scss b/client/scss/components/_form-side.scss index dcabca598f..844d695d2b 100644 --- a/client/scss/components/_form-side.scss +++ b/client/scss/components/_form-side.scss @@ -85,13 +85,6 @@ &:focus-within:has(:focus-visible) { @include focus-outline; } - - @supports not selector(:focus-visible) { - &:focus-within { - /* Fallback for browsers without :focus-visible support */ - @include focus-outline; - } - } } &__resize-grip-icon { diff --git a/client/scss/components/forms/_switch.scss b/client/scss/components/forms/_switch.scss index c6ce164aa5..67af68a37e 100644 --- a/client/scss/components/forms/_switch.scss +++ b/client/scss/components/forms/_switch.scss @@ -93,12 +93,6 @@ $switch-border-radius: math.div(($switch-height + $switch-border * 2), 2); outline: theme('colors.focus') solid $switch-outline; } - @supports not selector(:focus-visible) { - [type='checkbox']:focus + &__toggle { - outline: theme('colors.focus') solid $switch-outline; - } - } - [type='checkbox'] { position: absolute; opacity: 0; diff --git a/client/scss/overrides/_utilities.focus.scss b/client/scss/overrides/_utilities.focus.scss index d46863ae09..ed446416db 100644 --- a/client/scss/overrides/_utilities.focus.scss +++ b/client/scss/overrides/_utilities.focus.scss @@ -2,15 +2,6 @@ // Set global focus outline styles so they are consistent across the UI, // without individual components having to explicitly define focus styles. // Using !important because we want to enforce only one style is used across the UI. -// Remove :focus selectors once we stop supporting Safari 15.4. -*:focus { - outline: $focus-outline-width solid theme('colors.focus') !important; -} - -*:focus:not(:focus-visible) { - outline: none !important; -} - *:focus-visible { outline: $focus-outline-width solid theme('colors.focus') !important; }