UX: less janky animation for experimental sidebar (#17396)
This commit is contained in:
parent
8e0b1ee74d
commit
5a26c87fa6
|
@ -7,17 +7,22 @@
|
||||||
.header-sidebar-toggle {
|
.header-sidebar-toggle {
|
||||||
--toggle-padding: 0.5em;
|
--toggle-padding: 0.5em;
|
||||||
margin-right: 0.75em;
|
margin-right: 0.75em;
|
||||||
|
// extending the toggle beyond the page when space allows
|
||||||
|
// for better logo alignment with content
|
||||||
|
margin-left: -3.5em;
|
||||||
|
@media screen and (max-width: 1480px) {
|
||||||
|
margin-left: -0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1300px) {
|
@media screen and (max-width: 1380px) {
|
||||||
// extending the toggle beyond the page when space allows
|
body.has-sidebar-page & {
|
||||||
// for better logo alignment with content
|
margin-left: 0;
|
||||||
body:not(.has-sidebar-page) & {
|
|
||||||
margin-left: -3.7em;
|
|
||||||
transition: margin var(--d-sidebar-animation-speed)
|
|
||||||
var(--d-sidebar-animation-ease);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transition: margin var(--d-sidebar-animation-speed)
|
||||||
|
var(--d-sidebar-animation-ease);
|
||||||
|
|
||||||
.mobile-view & {
|
.mobile-view & {
|
||||||
margin-left: calc(var(--toggle-padding) * -1);
|
margin-left: calc(var(--toggle-padding) * -1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,10 +205,13 @@ body.has-sidebar-page {
|
||||||
body.sidebar-animate {
|
body.sidebar-animate {
|
||||||
#main-outlet-wrapper {
|
#main-outlet-wrapper {
|
||||||
// grid-template-columns transition supported in Firefox, Chrome support coming summer 2022
|
// grid-template-columns transition supported in Firefox, Chrome support coming summer 2022
|
||||||
transition: grid-template-columns var(--d-sidebar-animation-time);
|
transition-property: grid-template-columns, max-width;
|
||||||
|
transition-timing-function: var(--d-sidebar-animation-ease);
|
||||||
|
transition-duration: var(--d-sidebar-animation-time);
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-header-wrap .wrap {
|
.d-header-wrap .wrap {
|
||||||
transition: max-width var(--d-sidebar-animation-time);
|
transition: max-width var(--d-sidebar-animation-time)
|
||||||
|
var(--d-sidebar-animation-ease);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue