summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorAlan Mooiman <amooiman@gmail.com>2016-04-04 11:27:02 -0400
committerAlan Mooiman <amooiman@gmail.com>2016-04-04 11:32:15 -0400
commit1c06ceca109d78be91605c2626ee8ea119b186f3 (patch)
tree2213938db141b40c06635960542bdbbad8385bbb /webapp
parentead8e64ccb42081272bca1a498a08c05825ce9d0 (diff)
downloadchat-1c06ceca109d78be91605c2626ee8ea119b186f3.tar.gz
chat-1c06ceca109d78be91605c2626ee8ea119b186f3.tar.bz2
chat-1c06ceca109d78be91605c2626ee8ea119b186f3.zip
Smooth overlay transition when opening sidebar
Diffstat (limited to 'webapp')
-rw-r--r--webapp/sass/responsive/_mobile.scss32
1 files changed, 17 insertions, 15 deletions
diff --git a/webapp/sass/responsive/_mobile.scss b/webapp/sass/responsive/_mobile.scss
index 38476485d..c518f3729 100644
--- a/webapp/sass/responsive/_mobile.scss
+++ b/webapp/sass/responsive/_mobile.scss
@@ -714,19 +714,26 @@
.inner-wrap {
@include single-transition(all, .5s, ease);
-
+ &:before{
+ content:"";
+ //Some trickery in order for the z-index transition to happen immediately on move-in and delayed on move-out.
+ transition: background-color 0.5s ease, z-index 0s ease 0.5s;
+ background-color: transparent;
+ height: 100%;
+ width: calc(100% + 30px);
+ left: -15px;
+ position: absolute;
+ top: 0;
+ z-index: 0;
+ }
+
&.move--right {
@include translate3d(290px, 0, 0);
&:before {
z-index: 9999;
- content: '';
- width: 100%;
- height: 100%;
- left: -15px;
- top: 0;
- position: absolute;
- background: rgba(0, 0, 0, .4);
+ transition: background-color 0.5s ease;
+ background-color: rgba(0, 0, 0, 0.4);
}
}
@@ -734,13 +741,8 @@
@include translate3d(-290px, 0, 0);
&:before {
z-index: 9999;
- content: '';
- width: 100%;
- height: 100%;
- right: -15px;
- top: 0;
- position: absolute;
- background: rgba(0, 0, 0, .4);
+ transition: background-color 0.5s ease;
+ background-color: rgba(0, 0, 0, 0.4);
}
}