2
Based on great Codrops article
3
http://tympanus.net/Development/OffCanvasMenuEffects/sideslide.html
6
// in _settings.scss there are all variables used here
24
background: $color-main-dark;
25
padding: 2.5em 1.5em 0;
27
-webkit-transform: translate3d(100%, 0, 0);
28
-ms-transform: translate(100%, 0);
29
transform: translate3d(100%, 0, 0);
30
-webkit-transition: -webkit-transform 0.4s;
31
-ms-transition: -ms-transform 0.4s;
32
transition: transform 0.4s;
33
-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
34
-ms-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
35
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
37
color: $color-main-light;
40
color: darken($color-main-light, 20%);
52
background: transparent;
63
background: $color-main-light;
66
-webkit-transform: rotate(45deg);
67
-ms-transform: rotate(45deg);
68
transform: rotate(45deg);
71
-webkit-transform: rotate(-45deg);
72
-ms-transform: rotate(-45deg);
73
transform: rotate(-45deg);
88
-webkit-transform: translate3d(0, 100%, 0);
89
-ms-transform: translate(0, 100%);
90
transform: translate3d(0, 100%, 0);
91
-webkit-transition: -webkit-transform 0s 0.4s;
92
-ms-transition: -webkit-transform 0s 0.4s;
93
transition: transform 0s 0.4s;
94
-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
95
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
99
-webkit-transform: translate3d(0, rem-calc(500), 0);
100
-ms-transform: translate(0, rem-calc(500));
101
transform: translate3d(0, rem-calc(500), 0);
102
-webkit-transition: -webkit-transform 0s 0.4s;
103
-ms-transition: -ms-transform 0s 0.4s;
104
transition: transform 0s 0.4s;
105
-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
106
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
108
-webkit-transform: translate3d(0, rem-calc(1000), 0);
109
-ms-transform: translate(0, rem-calc(1000));
110
transform: translate3d(0, rem-calc(1000), 0);
113
-webkit-transform: translate3d(0, rem-calc(1500), 0);
114
-ms-transform: translate(0, rem-calc(1500));
115
transform: translate3d(0, rem-calc(2000), 0);
118
-webkit-transform: translate3d(0, rem-calc(2000), 0);
119
-ms-transform: translate(0, rem-calc(2000));
120
transform: translate3d(0, rem-calc(3000), 0);
123
-webkit-transform: translate3d(0, rem-calc(2500), 0);
124
-ms-transform: translate(0, rem-calc(2500));
125
transform: translate3d(0, rem-calc(4000), 0);
128
-webkit-transform: translate3d(0, rem-calc(3000), 0);
129
-ms-transform: translate(0, rem-calc(3000));
130
transform: translate3d(0, rem-calc(5000), 0);
133
margin-left: rem-calc(10);
136
&:hover, &:active, &:focus {
137
text-decoration: none;
141
-webkit-transform: translate3d(0, rem-calc(2000), 0);
142
-ms-transform: translate(0, rem-calc(2000));
143
transform: translate3d(0, rem-calc(3000), 0);
144
-webkit-transition: -webkit-transform 0s 0.4s;
145
-ms-transition: -ms-transform 0s 0.4s;
146
transition: transform 0s 0.4s;
147
-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
148
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
154
-webkit-transform: translate3d(0, 0, 0);
155
-ms-transform: translate(0, 0);
156
transform: translate3d(0, 0, 0);
157
-webkit-transition: -webkit-transform 0.8s;
158
-ms-transition: -ms-transform 0.8s;
159
transition: transform 0.8s;
160
-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
161
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
166
-webkit-transform: translate3d(0, 0, 0);
167
-ms-transform: translate(0, 0);
168
transform: translate3d(0, 0, 0);
169
-webkit-transition: -webkit-transform 0.8s;
170
-ms-transition: -ms-transform 0.8s;
171
transition: transform 0.8s;
172
-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
173
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
177
-webkit-transition-duration: 0.9s;
178
transition-duration: 0.9s;
190
background-color: transparent;
196
// menu hacks for old android buggy behaviour
197
html[data-useragent*='Android 4.0'],
198
html[data-useragent*='Android 4.1'],
199
html[data-useragent*='Android 4.2'] {
202
right: rem-calc(-320) !important;
203
-webkit-transform: none !important;
204
transform: none !important;
213
-webkit-transform: none !important;
214
transform: none !important;