-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path_sidebar.scss
More file actions
91 lines (77 loc) · 2.36 KB
/
_sidebar.scss
File metadata and controls
91 lines (77 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* @docs */
$sidebar-reduced-width: 10rem !default;
$sidebar-reduced-height: 10vh !default;
/* @docs */
/* @bootstrap docs */
// $offcanvas-padding-y: $modal-inner-padding;
// $offcanvas-padding-x: $modal-inner-padding;
// $offcanvas-horizontal-width: 400px;
// $offcanvas-vertical-height: 30vh;
// $offcanvas-transition-duration: .3s;
// $offcanvas-border-color: $modal-content-border-color;
// $offcanvas-border-width: $modal-content-border-width;
// $offcanvas-title-line-height: $modal-title-line-height;
// $offcanvas-bg-color: var(--#{$prefix}body-bg);
// $offcanvas-color: var(--#{$prefix}body-color);
// $offcanvas-box-shadow: $modal-content-box-shadow-xs;
// $offcanvas-backdrop-bg: $modal-backdrop-bg;
// $offcanvas-backdrop-opacity: $modal-backdrop-opacity;
/* @bootstrap docs */
@mixin size($height, $width) {
&.offcanvas-start,
&.offcanvas-end {
--#{$prefix}offcanvas-width: #{$width};
}
&.offcanvas-top,
&.offcanvas-bottom {
--#{$prefix}offcanvas-height: #{$height};
}
}
.sidebar {
.offcanvas {
.btn-close {
position: absolute;
right: 0.5rem;
top: 0.5rem;
cursor: pointer;
}
// Color variants
@each $name, $color in $theme-colors {
&.variant-#{$name} {
--#{$prefix}offcanvas-color: var(--#{$prefix}#{$name}-contrast);
--#{$prefix}offcanvas-bg: var(--#{$prefix}#{$name});
}
}
&.fullwidth {
--#{$prefix}offcanvas-width: 100%;
}
&.fullheight {
--#{$prefix}offcanvas-height: 100%;
}
&.reduced {
transition:
width $speed-slow $easing,
height $speed-slow $easing;
@include size($sidebar-reduced-height, $sidebar-reduced-width);
}
}
&.inline,
&.show {
.offcanvas,
.offcanvas-backdrop {
@extend .show;
}
}
&.inline {
position: relative;
.offcanvas {
--#{$prefix}offcanvas-zindex: 0;
position: relative;
}
.offcanvas-backdrop {
position: absolute;
height: auto;
margin: auto;
}
}
}