Skip to content

Commit

Permalink
Focus on navbar and dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
MewenLeHo authored and louismaximepiton committed Aug 30, 2022
1 parent eb29bc6 commit 6f7378c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
9 changes: 7 additions & 2 deletions scss/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,19 @@
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s

&:hover,
&:focus {
&:hover {
color: var(--#{$prefix}dropdown-link-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
outline-color: var(--#{$prefix}dropdown-link-hover-bg); // Boosted mod
@include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
}

&:focus {
&[data-focus-visible-added] {
@include focus-visible();
}
}

&.active,
&:active {
color: var(--#{$prefix}dropdown-link-active-color);
Expand Down
1 change: 0 additions & 1 deletion scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
color: var(--#{$prefix}nav-link-color);
text-decoration: if($link-decoration == none, null, none);
background: none; // Boosted mod: Prevent dropdown's background to interfere
@include transition($nav-link-transition);

&:hover {
color: var(--#{$prefix}nav-link-hover-color);
Expand Down
4 changes: 1 addition & 3 deletions scss/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,8 @@
margin-left: calc(var(--#{$prefix}navbar-nav-link-padding-x) * -1); /* stylelint-disable-line function-disallowed-list */
word-break: break-all;
outline-offset: $spacer;
@include transition($navbar-transition);

&:hover,
&:focus {
&:hover {
z-index: 1;
outline-offset: 0;
}
Expand Down
1 change: 0 additions & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,6 @@ $nav-link-font-size: null !default;
$nav-link-font-weight: $font-weight-bold !default;
$nav-link-color: var(--#{$prefix}link-color) !default;
$nav-link-hover-color: var(--#{$prefix}link-hover-color) !default;
$nav-link-transition: null !default;
$nav-link-disabled-color: $gray-500 !default;

$nav-tabs-border-color: $black !default;
Expand Down

0 comments on commit 6f7378c

Please sign in to comment.