Skip to content

Commit

Permalink
Add mobile width variable
Browse files Browse the repository at this point in the history
  • Loading branch information
francoispluchino committed Sep 21, 2021
1 parent 088cfe8 commit e61ec98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scss/_sidebar-core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@

@media (max-width: (map-get($sidebar-grid-breakpoints, $sidebar-mobile-breakpoint) - 1)) {
.fxp-sidebar {
width: 80%;
width: $sidebar-mobile-width;
-webkit-transform: translate3d(-100%, 0px, 0px);
transform: translate3d(-100%, 0px, 0px);
}

.fxp-sidebar-open + .fxp-sidebar-swipe,
.fxp-sidebar-force-open.fxp-sidebar-open + .fxp-sidebar-swipe {
left: 80%;
left: $sidebar-mobile-width;
}

.fxp-sidebar-force-open {
Expand All @@ -303,13 +303,14 @@

.fxp-sidebar-right {
&.fxp-sidebar {
width: $sidebar-right-mobile-width;
-webkit-transform: translate3d(100%, 0px, 0px);
transform: translate3d(100%, 0px, 0px);
}

&.fxp-sidebar-open + .fxp-sidebar-swipe {
left: auto;
right: 80%;
right: $sidebar-right-mobile-width;
}

&.fxp-sidebar-force-open {
Expand Down
2 changes: 2 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ $sidebar-width: 210px !default;
$sidebar-mini-width: round($sidebar-width / 3) !default;
$sidebar-right-width: $sidebar-width !default;
$sidebar-right-mini-width: round($sidebar-right-width / 3) !default;
$sidebar-mobile-width: 80%;
$sidebar-right-mobile-width: $sidebar-mobile-width;
$sidebar-clickable-swipe-bg: fade($primary, 23%) !default;
$sidebar-obfuscator-bg: rgba(0, 0, 0, 0.5) !default;
$sidebar-obfuscator-duration: '0.3s' !default;
Expand Down

0 comments on commit e61ec98

Please sign in to comment.