build(docs-infra): fix individual API overload templates (#24976)

* Make individual overloads collapsible
* Show only the first overload expanded, rest collapsed
* Text changes to 'collapse all' once 'show all' is clicked
* Fix chevron/carrot rotation animation when overloads / overload item is expanded or collapsed

PR Close #24976
This commit is contained in:
Pete Bacon Darwin
2018-08-13 07:23:45 +01:00
committed by Kara Erickson
parent 68dfa04f8a
commit 61cd5f7c0f
2 changed files with 43 additions and 10 deletions

View File

@ -161,13 +161,35 @@
summary {
height: inherit;
padding: 0 8px 8px;
padding: 0 0 8px;
h4 {
margin: 0;
}
.show-all {
display: initial;
}
.collapse-all {
display: none;
}
}
}
&[open] > summary {
.show-all {
display: none;
}
.collapse-all {
display: initial;
}
}
}
details.overload {
box-shadow: none;
margin: 0;
}
.from-constructor, .read-only-property {
font-size: 12px;
@ -248,7 +270,11 @@ details {
padding: 16px 24px;
}
&[open] > i.material-icons {
@include rotate(180deg); // Rotate the icon
// Rotate the icon
summary i.material-icons.expand {
@include rotate(0deg);
}
&[open] > summary i.material-icons.expand {
@include rotate(180deg);
}
}