Skip to content

Instantly share code, notes, and snippets.

@joshwcomeau
Last active June 19, 2016 12:15
Show Gist options
  • Save joshwcomeau/ef21ab6690440d57e38c470c565639f8 to your computer and use it in GitHub Desktop.
Save joshwcomeau/ef21ab6690440d57e38c470c565639f8 to your computer and use it in GitHub Desktop.
Aracari
.drawer {
position: absolute;
z-index: 10;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
.backdrop {
position: absolute;
z-index: 1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
&.is-open {
opacity: 1;
}
&.is-closed {
opacity: 0;
}
}
.content {
position: absolute;
z-index: 2;
left: 0;
right: 0;
bottom: 0;
height: 300px;
background: $white;
will-change: true;
&.is-open {
transform: translateY(0);
}
&.is-closed {
transform: translateY(300px);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment