Skip to content

Commit

Permalink
Update pagination focus styles
Browse files Browse the repository at this point in the history
- Drops the hover-focus mixin for standard :hover
- Adds explicit :focus styles to match button, input, etc with a box-shadow
- Adjusts z-index values to ensure the layers go initial, hover, active, focus

Fixes #24838.
  • Loading branch information
mdo committed Dec 31, 2017
1 parent d08eb55 commit 797149e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scss/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@
background-color: $pagination-bg;
border: $pagination-border-width solid $pagination-border-color;

@include hover-focus {
&:hover {
color: $pagination-hover-color;
text-decoration: none;
background-color: $pagination-hover-bg;
border-color: $pagination-hover-border-color;
}

&:focus {
z-index: 2;
outline: 0;
box-shadow: $pagination-focus-box-shadow;
}

// Opinionated: add "hand" cursor to non-disabled .page-link elements
&:not([disabled]):not(.disabled) {
Expand Down
2 changes: 2 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ $pagination-bg: $white !default;
$pagination-border-width: $border-width !default;
$pagination-border-color: $gray-300 !default;

$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;

$pagination-hover-color: $link-hover-color !default;
$pagination-hover-bg: $gray-200 !default;
$pagination-hover-border-color: $gray-300 !default;
Expand Down

0 comments on commit 797149e

Please sign in to comment.