Skip to content

Commit

Permalink
Highlight use cases where :focus-visible is used for BrowserStack tes…
Browse files Browse the repository at this point in the history
…ting
  • Loading branch information
julien-deramond committed Oct 12, 2022
1 parent b029cd6 commit 60ff612
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .bundlewatch.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"path": "./dist/css/bootstrap.css",
"maxSize": "29.5 kB"
"maxSize": "29.75 kB"
},
{
"path": "./dist/css/bootstrap.min.css",
Expand Down
8 changes: 6 additions & 2 deletions scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}

&:focus-visible {
color: var(--#{$prefix}btn-hover-color);
color: #ffc0cb;
@include gradient-bg(var(--#{$prefix}btn-hover-bg));
border-color: var(--#{$prefix}btn-hover-border-color);
outline: 0;
Expand All @@ -68,6 +68,7 @@
}

.btn-check:focus-visible + & {
color: #ffc0cb;
border-color: var(--#{$prefix}btn-hover-border-color);
outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
Expand All @@ -91,6 +92,8 @@
@include box-shadow(var(--#{$prefix}btn-active-shadow));

&:focus-visible {
color: #ffc0cb;

// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
Expand Down Expand Up @@ -179,11 +182,12 @@

&:hover,
&:focus-visible {
color: #ffc0cb;
text-decoration: $link-hover-decoration;
}

&:focus-visible {
color: var(--#{$prefix}btn-color);
color: #ffc0cb;
}

&:hover {
Expand Down
1 change: 1 addition & 0 deletions scss/_reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ button {
// confused and applies its very visible two-tone outline anyway.

button:focus:not(:focus-visible) {
color: #cbf;
outline: 0;
}

Expand Down
1 change: 1 addition & 0 deletions site/assets/scss/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

.dropdown-toggle {
&:focus:not(:focus-visible) {
color: #cbf;
outline: 0;
}
}
Expand Down

0 comments on commit 60ff612

Please sign in to comment.