Skip to content

Commit

Permalink
fix: adds focus outline none back to components with focus visible ap…
Browse files Browse the repository at this point in the history
…plied (#2006)
  • Loading branch information
pixelflips authored and kajabi-bot committed Oct 18, 2024
1 parent d9b8036 commit b5632c3
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/sage-assets/lib/stylesheets/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ $-btn-loading-min-height: rem(36px);
transition: $-btn-transition;
transition-property: border, background-color, box-shadow;

&:focus {
outline: none;
}

&:disabled,
&[aria-disabled="true"] {
@include sage-button-style-disabled;
Expand Down Expand Up @@ -601,10 +605,6 @@ a.sage-btn {
border-color: sage-color(grey, 300);
}

&:focus {
outline: none;
}

&:focus-visible,
&:active {
background-color: sage-color(white);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ $-checkbox-focus-outline-color: sage-color(purple, 300);
background-color: sage-color(grey, 100);
}

&:focus:not(:disabled) {
outline: none;
}

&:focus-visible:not(:disabled),
&:active:not(:disabled) {
outline: none;
Expand Down
4 changes: 4 additions & 0 deletions packages/sage-assets/lib/stylesheets/components/_choice.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ $-choice-radio-color-checked-inner: map-get($sage-radio-colors, checked-inner);
color: $-choice-color-active;
}

&:focus {
outline: none;
}

&:focus-visible {
border-color: sage-color(purple, 300);
outline: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ $-dropdown-trigger-dropdown-offset: rem(16px) + sage-spacing(xs);

@extend %t-sage-body;

&:focus {
outline: none;
}

&:active,
&:focus-visible,
&:focus-within {
Expand Down
4 changes: 4 additions & 0 deletions packages/sage-assets/lib/stylesheets/components/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ $-link-base-styles: (
color: sage-color(grey, 600);
}

&:focus {
outline: none;
}

&:hover,
&:active,
&:focus-visible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ $-media-tile-breakpoints: (
color: inherit;
}

&:focus {
outline: none;
}

&:focus-visible {
outline: 0;

Expand Down
4 changes: 4 additions & 0 deletions packages/sage-assets/lib/stylesheets/components/_radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ $-radio-focus-outline-color: currentColor;
}
}

&:focus:not(:disabled) {
outline: none;
}

&:focus-visible:not(:disabled),
&:active:not(:disabled) {
outline: none;
Expand Down
4 changes: 4 additions & 0 deletions packages/sage-assets/lib/stylesheets/components/_switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ $-switch-toggle-size: rem(16px);
border-radius: $-switch-border-radius;
transition: background 0.3s ease-out;

&:focus {
outline: none !important; /* stylelint-disable-line declaration-no-important */
}

.sage-switch--has-border & {
position: absolute;
}
Expand Down

0 comments on commit b5632c3

Please sign in to comment.