Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar bug fix #551

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions scss/sidebar/_sidebar-narrow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,20 @@
}
}

.sidebar-narrow,
.sidebar-narrow-unfoldable {
@include media-breakpoint-up($mobile-breakpoint) {
&:not(.sidebar-end):not(.hide) ~ * {
--#{$prefix}sidebar-occupy-start: #{$sidebar-narrow-width} !important; // stylelint-disable-line declaration-no-important
}
&.sidebar-end:not(.hide) ~ * {
--#{$prefix}sidebar-occupy-end: #{$sidebar-narrow-width} !important; // stylelint-disable-line declaration-no-important
}
}
}

.sidebar-narrow {
@extend %sidebar-narrow;
&:not(.sidebar-end) ~ * {
--#{$prefix}sidebar-occupy-start: #{$sidebar-narrow-width} !important; // stylelint-disable-line declaration-no-important
}
&.sidebar-end ~ * {
--#{$prefix}sidebar-occupy-end: #{$sidebar-narrow-width} !important; // stylelint-disable-line declaration-no-important
}

.nav-link {
overflow: hidden;
Expand All @@ -76,13 +82,6 @@
.sidebar-narrow-unfoldable {
position: fixed;

&:not(.sidebar-end) ~ * {
--#{$prefix}sidebar-occupy-start: #{$sidebar-narrow-width} !important; // stylelint-disable-line declaration-no-important
}
&.sidebar-end ~ * {
--#{$prefix}sidebar-occupy-end: #{$sidebar-narrow-width} !important; // stylelint-disable-line declaration-no-important
}

&:not(:hover) {
@extend %sidebar-narrow;
}
Expand Down
12 changes: 6 additions & 6 deletions scss/sidebar/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
&:not(.sidebar-end){
@include ltr-rtl("margin-left", calc(-1 * var(--#{$prefix}sidebar-width)));
~ * {
--#{$prefix}sidebar-occupy-start: 0;
--#{$prefix}sidebar-occupy-start: 0 !important; // stylelint-disable-line declaration-no-important
}
}
&.sidebar-end {
@include ltr-rtl("margin-right", calc(-1 * var(--#{$prefix}sidebar-width)));
~ * {
--#{$prefix}sidebar-occupy-end: 0;
--#{$prefix}sidebar-occupy-end: 0 !important; // stylelint-disable-line declaration-no-important
}
}
}
Expand Down Expand Up @@ -119,15 +119,15 @@
@include ltr-rtl("left", 0);
@include ltr-rtl("margin-left", calc(-1 * var(--#{$prefix}sidebar-width)));
~ * {
--#{$prefix}sidebar-occupy-start: 0 !important; // stylelint-disable-line
--#{$prefix}sidebar-occupy-start: 0 !important; // stylelint-disable-line declaration-no-important
}
}

&.sidebar-end {
@include ltr-rtl("right", 0);
@include ltr-rtl("margin-right", calc(-1 * var(--#{$prefix}sidebar-width)));
~ * {
--#{$prefix}sidebar-occupy-end: 0 !important; // stylelint-disable-line
--#{$prefix}sidebar-occupy-end: 0 !important; // stylelint-disable-line declaration-no-important
}
}

Expand Down Expand Up @@ -157,7 +157,7 @@
&:not(.sidebar-end) {
@include ltr-rtl("left", 0);
~ * {
--#{$prefix}sidebar-occupy-start: 0 !important; // stylelint-disable-line
--#{$prefix}sidebar-occupy-start: 0 !important; // stylelint-disable-line declaration-no-important
}

&:not(.show) {
Expand All @@ -167,7 +167,7 @@
&.sidebar-end {
@include ltr-rtl("right", 0);
~ * {
--#{$prefix}sidebar-occupy-end: 0 !important; // stylelint-disable-line
--#{$prefix}sidebar-occupy-end: 0 !important; // stylelint-disable-line declaration-no-important
}

&:not(.show) {
Expand Down
Loading