Add animations to sidebar toggling
This commit is contained in:
parent
91cdfc9378
commit
5c5b3568cd
@ -9,13 +9,6 @@
|
||||
|
||||
@media screen and (max-width: 35rem) {
|
||||
.dashboard {
|
||||
grid-template:
|
||||
[row1-start] "topbar" 3.5rem [row1-end]
|
||||
[row2-start] "main" auto [row2-end]
|
||||
/ auto;
|
||||
}
|
||||
|
||||
.dashboard.sidebar-open {
|
||||
grid-template:
|
||||
[row1-start] "title topbar" 3.5rem [row1-end]
|
||||
[row2-start] "user main" 2.5rem [row2-end]
|
||||
|
@ -63,9 +63,10 @@
|
||||
@import topbar
|
||||
|
||||
@media screen and (max-width: 35rem)
|
||||
&:not(.sidebar-open)
|
||||
> nav.sidebar, > a.title, > div.user
|
||||
display: none !important
|
||||
&:not(.sidebar-open) > *
|
||||
transform: translateX(-15rem)
|
||||
> *
|
||||
transition: transform 0.4s
|
||||
|
||||
> main.view
|
||||
grid-area: main
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
transform-origin: 4px 0
|
||||
|
||||
//transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), opacity 0.55s ease
|
||||
transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), opacity 0.55s ease
|
||||
|
||||
&:nth-of-type(1)
|
||||
transform-origin: 0 0
|
||||
@ -56,6 +56,7 @@
|
||||
transform-origin: 0 100%
|
||||
|
||||
transform: translateY(2px)
|
||||
transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0)
|
||||
|
||||
&.active
|
||||
transform: translateX(1px) translateY(4px)
|
||||
|
Loading…
Reference in New Issue
Block a user