Skip to content

Commit

Permalink
fix(material/api-theme): fix nav items hover/focus contrast (angular#…
Browse files Browse the repository at this point in the history
…1004)

- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes angular#759
  • Loading branch information
kian23kpt authored Jun 15, 2021
1 parent e90ada7 commit 3f766ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@

.docs-navbar, .docs-navbar-header {
background: mat.get-color-from-palette($primary);

& a:hover, & a:focus {
background: rgba(0, 0, 0, 0.4);
color: mat.get-color-from-palette($accent, 200);
}

.docs-navbar-header-item-selected {
background: rgba(0, 0, 0, 0.2);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
</a>
<a mat-button class="docs-navbar-hide-small docs-button"
*ngFor="let key of sectionKeys"
[routerLink]="key">{{sections[key].name}}</a>
<a mat-button class="docs-navbar-hide-small docs-button" routerLink="guides">Guides</a>
[routerLink]="key"
routerLinkActive="docs-navbar-header-item-selected">{{sections[key].name}}</a>
<a mat-button class="docs-navbar-hide-small docs-button" routerLink="guides" routerLinkActive="docs-navbar-header-item-selected">Guides</a>
<div class="flex-spacer"></div>
<version-picker></version-picker>
<theme-picker></theme-picker>
Expand Down

0 comments on commit 3f766ac

Please sign in to comment.