2015-10-02 23:08:02 +03:00
|
|
|
@import "../variables";
|
|
|
|
@import "../mixins";
|
|
|
|
|
|
|
|
//-- Variables
|
|
|
|
$drawer-width: 24 * $unit;
|
|
|
|
$drawer-bg-color: unquote("rgb(#{$palette-grey-50})") !default;
|
|
|
|
$drawer-text-color: unquote("rgb(#{$palette-grey-800})") !default;
|
|
|
|
$drawer-border-color: unquote("rgb(#{$palette-grey-300})") !default;
|
|
|
|
|
|
|
|
//-- Local styles
|
|
|
|
.drawer {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 2;
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2015-10-04 16:12:53 +03:00
|
|
|
.active {
|
2015-10-02 23:08:02 +03:00
|
|
|
pointer-events: all;
|
|
|
|
> .content {
|
2015-10-06 08:21:04 +03:00
|
|
|
transition-delay: $animation-delay;
|
2015-10-02 23:08:02 +03:00
|
|
|
transform: translateX(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
> .overlay {
|
2015-10-06 08:21:04 +03:00
|
|
|
opacity: $color-overlay-opacity;
|
2015-10-02 23:08:02 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.left {
|
|
|
|
> .content {
|
|
|
|
left: 0;
|
|
|
|
border-right: 1px solid $drawer-border-color;
|
|
|
|
}
|
|
|
|
|
2015-10-04 16:12:53 +03:00
|
|
|
&:not(.active) > .content {
|
2015-10-02 23:08:02 +03:00
|
|
|
transform: translateX(- $drawer-width);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.right {
|
|
|
|
> .content {
|
|
|
|
right: 0;
|
|
|
|
border-left: 1px solid $drawer-border-color;
|
|
|
|
}
|
|
|
|
|
2015-10-04 16:12:53 +03:00
|
|
|
&:not(.active) > .content {
|
2015-10-02 23:08:02 +03:00
|
|
|
transform: translateX($drawer-width);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.overlay {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2015-10-06 08:21:04 +03:00
|
|
|
background-color: $color-overlay;
|
2015-10-02 23:08:02 +03:00
|
|
|
opacity: 0;
|
|
|
|
transition-timing-function: $animation-curve-default;
|
2015-10-06 08:21:04 +03:00
|
|
|
transition-duration: $animation-duration;
|
2015-10-02 23:08:02 +03:00
|
|
|
transition-property: opacity;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
@include shadow-2dp();
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
display: block;
|
|
|
|
width: $drawer-width;
|
|
|
|
height: 100%;
|
|
|
|
overflow-y: scroll;
|
|
|
|
color: $drawer-text-color;
|
|
|
|
background-color: $drawer-bg-color;
|
|
|
|
transition-delay: 0s;
|
|
|
|
transition-timing-function: $animation-curve-default;
|
2015-10-06 08:21:04 +03:00
|
|
|
transition-duration: $animation-duration;
|
2015-10-02 23:08:02 +03:00
|
|
|
transition-property: transform;
|
|
|
|
transform-style: preserve-3d;
|
|
|
|
will-change: transform;
|
|
|
|
}
|