Skip to content

Commit e61ec98

Browse files
Add mobile width variable
1 parent 088cfe8 commit e61ec98

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scss/_sidebar-core.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@
285285

286286
@media (max-width: (map-get($sidebar-grid-breakpoints, $sidebar-mobile-breakpoint) - 1)) {
287287
.fxp-sidebar {
288-
width: 80%;
288+
width: $sidebar-mobile-width;
289289
-webkit-transform: translate3d(-100%, 0px, 0px);
290290
transform: translate3d(-100%, 0px, 0px);
291291
}
292292

293293
.fxp-sidebar-open + .fxp-sidebar-swipe,
294294
.fxp-sidebar-force-open.fxp-sidebar-open + .fxp-sidebar-swipe {
295-
left: 80%;
295+
left: $sidebar-mobile-width;
296296
}
297297

298298
.fxp-sidebar-force-open {
@@ -303,13 +303,14 @@
303303

304304
.fxp-sidebar-right {
305305
&.fxp-sidebar {
306+
width: $sidebar-right-mobile-width;
306307
-webkit-transform: translate3d(100%, 0px, 0px);
307308
transform: translate3d(100%, 0px, 0px);
308309
}
309310

310311
&.fxp-sidebar-open + .fxp-sidebar-swipe {
311312
left: auto;
312-
right: 80%;
313+
right: $sidebar-right-mobile-width;
313314
}
314315

315316
&.fxp-sidebar-force-open {

scss/_variables.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ $sidebar-width: 210px !default;
4848
$sidebar-mini-width: round($sidebar-width / 3) !default;
4949
$sidebar-right-width: $sidebar-width !default;
5050
$sidebar-right-mini-width: round($sidebar-right-width / 3) !default;
51+
$sidebar-mobile-width: 80%;
52+
$sidebar-right-mobile-width: $sidebar-mobile-width;
5153
$sidebar-clickable-swipe-bg: fade($primary, 23%) !default;
5254
$sidebar-obfuscator-bg: rgba(0, 0, 0, 0.5) !default;
5355
$sidebar-obfuscator-duration: '0.3s' !default;

0 commit comments

Comments
 (0)