Skip to content

Commit 2f32623

Browse files
committed
fix(sidebar): emit proper CSS variable when non-default width is set.
1 parent cf18c9d commit 2f32623

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

scss/sidebar/_sidebar.scss

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,17 @@
5555
@each $width, $value in $sidebar-widths {
5656
&.sidebar-#{$width} {
5757
--#{$variable-prefix}sidebar-width: #{$value};
58-
--#{$variable-prefix}sidebar-occupy-start: #{$value};
59-
60-
~ * {
61-
--#{$variable-prefix}sidebar-width: #{$value};
62-
--#{$variable-prefix}sidebar-occupy-end: #{$value};
58+
@include media-breakpoint-up($mobile-breakpoint) {
59+
&:not(.sidebar-end):not(.hide) {
60+
~ * {
61+
--#{$variable-prefix}sidebar-occupy-start: #{$value};
62+
}
63+
}
64+
&.sidebar-end:not(.hide) {
65+
~ * {
66+
--#{$variable-prefix}sidebar-occupy-end: #{$value};
67+
}
68+
}
6369
}
6470
}
6571
}

0 commit comments

Comments
 (0)