Fix highlight colors for navigation links

This commit is contained in:
squidfunk
2016-12-18 14:22:08 +01:00
parent 2ae22c2e3b
commit 91c4926fe3
4 changed files with 110 additions and 103 deletions

View File

@@ -110,6 +110,12 @@ button[data-md-color-accent] {
border-left: 0.4rem solid $color;
}
}
// Current or hovered link
.md-nav__link:active,
.md-nav__link--active {
color: $color;
}
}
}
@@ -171,22 +177,10 @@ button[data-md-color-accent] {
}
// Current or hovered link
.md-nav__link:hover,
.md-nav__link:active,
.md-nav__link--active {
.md-nav__link:hover {
color: $color;
}
// [tablet portrait -]: Show table of contents in drawer
@include break-to-device(tablet portrait) {
// Show link to table of contents - higher specificity is necessary to
// display the table of contents inside the drawer
html & .md-nav__link[for="toc"]::after {
color: $color;
}
}
// Search container scrollbar thumb
.md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: $color;

View File

@@ -118,10 +118,14 @@
color: $md-color-black--light;
}
// Current or hovered item
&:hover,
// Active item
&:active,
&--active {
color: $md-color-primary;
}
// Hovered item
&:hover {
color: $md-color-accent;
}
}
@@ -216,7 +220,6 @@
top: 50%;
right: 1.2rem;
transform: translateY(-50%) rotate(-90deg);
transition: inherit;
color: $md-color-black--light;
font-size: 2.4rem;
}
@@ -306,7 +309,7 @@
// Unrotate icon for table of contents
&::after {
transform: translateY(-50%);
color: $md-color-accent;
color: inherit;
content: "toc";
}