1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-27 17:00:54 +01:00

Fixed animation of expanded navigation items

This commit is contained in:
squidfunk 2023-11-19 10:45:45 +01:00
parent 5a42f9f2d2
commit dcc296e42e
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
6 changed files with 10 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.78cf6014.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.fad675c6.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.356b1318.min.css' | url }}">

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);
}
}