Fixed animation of expanded navigation items

This commit is contained in:
squidfunk
2023-11-19 10:45:45 +01:00
parent 5a42f9f2d2
commit dcc296e42e
6 changed files with 10 additions and 5 deletions

View File

@@ -567,7 +567,7 @@
}
// Show nested navigation when toggle is active or indeterminate
&__toggle:is(:checked, :indeterminate) ~ & {
&__toggle:is(:checked, .md-toggle--indeterminate) ~ & {
grid-template-rows: 1fr;
visibility: visible;
opacity: 1;
@@ -577,6 +577,11 @@
visibility 0ms;
}
// Disable transition for expanded navigation
&__toggle.md-toggle--indeterminate ~ & {
transition: none;
}
// Hide navigation title in nested navigation
&__item--nested > & > &__title {
display: none;
@@ -661,7 +666,7 @@
// Navigation icon - rotate icon when toggle is active or indeterminate
.md-nav__item--nested .md-nav__toggle:checked ~ .md-nav__link &,
.md-nav__item--nested .md-nav__toggle:indeterminate ~ .md-nav__link & {
.md-nav__item--nested .md-toggle--indeterminate ~ .md-nav__link & {
transform: rotate(90deg);
}
}