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