Animation fix

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-09-12 16:43:28 +02:00
parent a8df5c2bed
commit 6ff81cdd4b
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
1 changed files with 8 additions and 18 deletions

View File

@ -113,11 +113,9 @@ kbd {
box-shadow: inset 2px 0 $color-primary;
}
}
&.open > ul {
display: block;
}
/* hide and animate the deletion of subitems */
&.deleted {
/* hide and animate deletion/collapse of subitems */
&.deleted,
&.collapsible:not(.open) {
> ul {
opacity: 0;
max-height: 0;
@ -133,6 +131,7 @@ kbd {
transition: max-height 250ms cubic-bezier(0, 1, 0, 1),
opacity 250ms ease-in-out;
max-height: 2000px;
opacity: 1;
> li {
display: inline-flex;
flex-wrap: wrap;
@ -218,12 +217,6 @@ kbd {
}
}
}
.collapsible.open {
ul {
display: block;
}
}
}
&.hidden {
display: none;
@ -253,9 +246,6 @@ kbd {
* Collapsible menus
*/
.collapsible {
> ul {
display: none;
}
&:after {
position: absolute;
height: 44px;
@ -276,11 +266,11 @@ kbd {
-webkit-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
}
/* force padding on link if collapse is here no matter if a has an icon class */
& + a {
padding-left: 44px;
}
/* force padding on link if collapse is here no matter if a has an icon class */
> a:first-child {
padding-left: 44px;
}
&:after,
> a {