fix(docs-infra): fix top menu item clickable area (#27633)

the clickable region of the top menu item is expanded beyond the focused area, so the clickable area is spans the entire height of the navigation

fixes #27618

PR Close #27633
This commit is contained in:
Esteban Marin 2018-12-12 07:51:50 +01:00 committed by Miško Hevery
parent 1cc08b4a4a
commit e3a2ca5ad9
2 changed files with 16 additions and 5 deletions

View File

@ -5,7 +5,11 @@ import { NavigationNode } from 'app/navigation/navigation.service';
selector: 'aio-top-menu',
template: `
<ul role="navigation">
<li *ngFor="let node of nodes"><a class="nav-link" [href]="node.url" [title]="node.title">{{ node.title }}</a></li>
<li *ngFor="let node of nodes">
<a class="nav-link" [href]="node.url" [title]="node.title">
<span class="nav-link-inner">{{ node.title }}</span>
</a>
</li>
</ul>`
})
export class TopMenuComponent {

View File

@ -147,13 +147,20 @@ aio-top-menu {
a.nav-link {
margin: 0;
padding: 8px 16px;
padding: 24px 0px;
cursor: pointer;
border-radius: 4px;
.nav-link-inner {
padding: 8px 16px;
}
&:focus {
background: rgba($white, 0.15);
outline: none;
.nav-link-inner {
background: rgba($white, 0.15);
border-radius: 4px;
}
}
}
}