fix(docs-infra): fix code hover style in TOC (#31173)

Fixes #31170

PR Close #31173
This commit is contained in:
Stefanie Fluin 2019-06-20 12:31:15 -07:00 committed by Matias Niemelä
parent 66d6b53fb1
commit d33204956f

View File

@ -6,23 +6,8 @@
bottom: 12px; bottom: 12px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
}
aio-toc.embedded {
@media (min-width: 801px) {
display: none;
}
.toc-inner { .toc-inner {
padding: 12px 0 0 0;
.toc-heading {
margin: 0 0 8px;
}
}
}
.toc-inner {
@include font-size(13); @include font-size(13);
overflow-y: visible; overflow-y: visible;
padding: 4px 0 0 10px; padding: 4px 0 0 10px;
@ -36,15 +21,16 @@ aio-toc.embedded {
font-weight: 500; font-weight: 500;
margin: 0 0 16px 8px; margin: 0 0 16px 8px;
padding: 0; padding: 0;
}
.toc-heading.secondary { &.secondary {
position: relative; position: relative;
top: -8px; top: -8px;
&:hover { &:hover {
color: $accentblue; color: $accentblue;
} }
}
} }
button.toc-heading, button.toc-heading,
@ -86,24 +72,24 @@ aio-toc.embedded {
&:hover { &:hover {
color: $accentblue; color: $accentblue;
} }
}
button.toc-more-items::after { &::after {
content: 'expand_less'; content: 'expand_less';
} }
button.toc-more-items.collapsed::after { &.collapsed::after {
content: 'more_horiz'; content: 'more_horiz';
} }
}
.mat-icon {
.mat-icon.collapsed { &.collapsed {
@include rotate(0deg); @include rotate(0deg);
} }
.mat-icon:not(.collapsed) { &:not(.collapsed) {
@include rotate(90deg); @include rotate(90deg);
// margin: 4px; }
} }
ul.toc-list { ul.toc-list {
@ -129,7 +115,7 @@ aio-toc.embedded {
height: 1px; height: 1px;
width: 40%; width: 40%;
margin: 7px 0 4px 0; margin: 7px 0 4px 0;
background: #DBDBDB; background: $lightgray;
clear: both; clear: both;
} }
@ -144,12 +130,14 @@ aio-toc.embedded {
display: table-cell; display: table-cell;
} }
&:hover a { &:hover {
* {
color: $accentblue; color: $accentblue;
} }
}
&.active { &.active {
a { * {
color: $blue; color: $blue;
font-weight: 500; font-weight: 500;
@ -197,9 +185,24 @@ aio-toc.embedded {
} }
} }
} }
}
} }
aio-toc.embedded > div.collapsed li.secondary { // Alternative TOC View for Smaller Screens
aio-toc.embedded {
@media (min-width: 801px) {
display: none; display: none;
}
.toc-inner {
padding: 12px 0 0 0;
.toc-heading {
margin: 0 0 8px;
}
}
> div.collapsed li.secondary {
display: none;
}
} }