Skip to content

Commit

Permalink
Merge pull request #1060 from primer/fix-aria-current
Browse files Browse the repository at this point in the history
Add support for aria-current=false
  • Loading branch information
simurai authored May 21, 2020
2 parents 81d833f + 30fe2cf commit 9798f56
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

.breadcrumb-item-selected,
.breadcrumb-item[aria-current] {
.breadcrumb-item[aria-current]:not([aria-current=false]) {
color: $text-gray;

&::after {
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/filter-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

&.selected,
&[aria-selected=true],
&[aria-current] {
&[aria-current]:not([aria-current=false]) {
color: $text-white;
background-color: $bg-blue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

&.selected,
&[aria-selected=true],
&[aria-current] {
&[aria-current]:not([aria-current=false]) {
font-weight: $font-weight-bold;
color: $text-gray-dark;
cursor: default;
Expand Down
4 changes: 2 additions & 2 deletions src/navigation/sidenav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
background-color: $bg-white;
}

.SideNav-item[aria-current="page"],
.SideNav-item[aria-current]:not([aria-current=false]),
.SideNav-item[aria-selected="true"] {
font-weight: $font-weight-semibold;
color: $text-gray-dark;
Expand Down Expand Up @@ -104,7 +104,7 @@
outline: none;
}

.SideNav-subItem[aria-current="page"],
.SideNav-subItem[aria-current]:not([aria-current=false]),
.SideNav-subItem[aria-selected="true"] {
font-weight: $font-weight-semibold;
color: $text-gray-dark;
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/subnav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

&.selected,
&[aria-selected=true],
&[aria-current] {
&[aria-current]:not([aria-current=false]) {
z-index: 2;
color: $text-white;
background-color: $bg-blue;
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/tabnav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

&.selected,
&[aria-selected=true],
&[aria-current] {
&[aria-current]:not([aria-current=false]) {
color: $text-gray-dark;
background-color: $bg-white;
border-color: $border-gray-dark;
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/underline-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

&.selected,
&[role=tab][aria-selected=true],
&[aria-current] {
&[aria-current]:not([aria-current=false]) {
font-weight: $font-weight-bold;
color: $text-gray-dark;
// stylelint-disable-next-line primer/borders
Expand Down
3 changes: 1 addition & 2 deletions src/pagination/pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@

.current,
.current:hover,
[aria-current],
[aria-current]:hover {
[aria-current]:not([aria-current=false]) {
z-index: 3;
color: $text-white;
background-color: $bg-blue;
Expand Down

0 comments on commit 9798f56

Please sign in to comment.