Skip to content

Commit

Permalink
package update
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Heusschen committed Jan 17, 2021
1 parent cbda378 commit c910694
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 231 deletions.
2 changes: 1 addition & 1 deletion dist/mmenu-light.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

161 changes: 80 additions & 81 deletions src/modules/offcanvas-drawer/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SCSS Variables
$prefix: '.mm-ocd';
$prefix: ".mm-ocd";

$mmocd_width: 80% !default;
$mmocd_min_width: 200px !default;
Expand All @@ -9,106 +9,105 @@ $mmocd_transition_duration: 0.3s !default;

// CSS variables
:root {
/** Width for the drawer. */
--mm-ocd-width: #{$mmocd_width};
/** Width for the drawer. */
--mm-ocd-width: #{$mmocd_width};

/** Min-width for the drawer. */
--mm-ocd-min-width: #{$mmocd_min_width};
/** Min-width for the drawer. */
--mm-ocd-min-width: #{$mmocd_min_width};

/** Max-width for the drawer. */
--mm-ocd-max-width: #{$mmocd_max_width};
/** Max-width for the drawer. */
--mm-ocd-max-width: #{$mmocd_max_width};
}

// The rest of the page
body#{$prefix}-opened {
// Somewhat prevents scrolling.
overflow-y: hidden;
overscroll-behavior: none;
// Somewhat prevents scrolling.
overflow-y: hidden;
overscroll-behavior: none;
}

// The wrapper
#{$prefix} {
position: fixed;
top: 0;
right: 0;
bottom: 100%;
left: 0;
z-index: 9999;
overflow: hidden;
overscroll-behavior: contain;
background: rgba(#000, 0);
transition: {
property: bottom, background-color;
duration: 0s, $mmocd_transition_duration;
timing-function: ease;
delay: $mmocd_transition_duration * 1.5,
$mmocd_transition_duration * 0.5;
}

&--open {
bottom: 0;
background: rgba(#000, 0.25);
transition-delay: 0s;
}
position: fixed;
top: 0;
right: 0;
bottom: 100%;
left: 0;
z-index: 9999;
overflow: hidden;
overscroll-behavior: contain;
background: rgba(#000, 0);
transition: {
property: bottom, background-color;
duration: 0s, $mmocd_transition_duration;
timing-function: ease;
delay: $mmocd_transition_duration * 1.5, $mmocd_transition_duration * 0.5;
}

&--open {
bottom: 0;
background: rgba(#000, 0.25);
transition-delay: 0s;
}
}

// The content
#{$prefix}__content {
position: absolute;
top: 0;
bottom: 0;
z-index: 2;

width: $mmocd_width; // IE11 fallback
width: var(--mm-ocd-width);
min-width: $mmocd_min_width; // IE11 fallback
min-width: var(--mm-ocd-min-width);
max-width: $mmocd_max_width; // IE11 fallback
max-width: var(--mm-ocd-max-width);

background: #fff;
transition: {
property: transform;
duration: $mmocd_transition_duration;
timing-function: ease;
}

#{$prefix}--left & {
left: 0;
transform: translate3d(-100%, 0, 0);
}

#{$prefix}--right & {
right: 0;
transform: translate3d(100%, 0, 0);
}

#{$prefix}--open & {
transform: translate3d(0, 0, 0);
}
position: absolute;
top: 0;
bottom: 0;
z-index: 2;

width: $mmocd_width; // IE11 fallback
width: var(--mm-ocd-width);
min-width: $mmocd_min_width; // IE11 fallback
min-width: var(--mm-ocd-min-width);
max-width: $mmocd_max_width; // IE11 fallback
max-width: var(--mm-ocd-max-width);

background: #fff;
transition: {
property: transform;
duration: $mmocd_transition_duration;
timing-function: ease;
}

#{$prefix}--left & {
left: 0;
transform: translate3d(-100%, 0, 0);
}

#{$prefix}--right & {
right: 0;
transform: translate3d(100%, 0, 0);
}

#{$prefix}--open & {
transform: translate3d(0, 0, 0);
}
}

// The backdrop
#{$prefix}__backdrop {
position: absolute;
top: 0;
bottom: 0;
z-index: 3;
position: absolute;
top: 0;
bottom: 0;
z-index: 3;

width: calc(100% - #{$mmocd_width}); // IE11 fallback
width: calc(100% - var(--mm-ocd-width));
min-width: calc(100% - #{$mmocd_max_width}); // IE11 fallback
min-width: calc(100% - var(--mm-ocd-max-width));
max-width: calc(100% - #{$mmocd_min_width}); // IE11 fallback
max-width: calc(100% - var(--mm-ocd-min-width));
width: calc(100% - #{$mmocd_width}); // IE11 fallback
width: calc(100% - var(--mm-ocd-width));
min-width: calc(100% - #{$mmocd_max_width}); // IE11 fallback
min-width: calc(100% - var(--mm-ocd-max-width));
max-width: calc(100% - #{$mmocd_min_width}); // IE11 fallback
max-width: calc(100% - var(--mm-ocd-min-width));

background: rgba(3, 2, 1, 0);
background: rgba(3, 2, 1, 0);

#{$prefix}--left & {
right: 0;
}
#{$prefix}--left & {
right: 0;
}

#{$prefix}--right & {
left: 0;
}
#{$prefix}--right & {
left: 0;
}
}
Loading

0 comments on commit c910694

Please sign in to comment.