weekly release 3.8dev
[moodle.git] / theme / boost / scss / moodle / drawer.scss
CommitLineData
99061152
DW
1/* Anchor link offset fix. This makes hash links scroll 60px down to account for the fixed header. */
2$fixed-header-y: $navbar-height;
3
7bfebce0
ME
4$drawer-width: 285px !default;
5$drawer-padding-x: 20px !default;
6$drawer-padding-y: 20px !default;
7$drawer-offscreen-gutter: 20px !default;
99061152 8
0e202eca
BB
9:target::before {
10 content: " ";
11 display: block;
12 height: ($fixed-header-y + 10px); /* fixed header height*/
13 margin-top: -($fixed-header-y + 10px); /* negative fixed header height */
600de03e
TM
14 width: 1px;
15 pointer-events: none;
99061152 16}
0e202eca 17
ba5c5083
DW
18.pagelayout-embedded :target {
19 padding-top: initial;
20 margin-top: initial;
21}
99061152
DW
22
23#nav-drawer.closed {
0a58ec24 24 left: -($drawer-width + $drawer-offscreen-gutter);
99061152 25}
99061152
DW
26
27/* Use a variable for the drawer background colors. */
28$drawer-bg: $gray-lighter !default;
29
30[data-region="drawer"] {
31 position: fixed;
32 padding: $drawer-padding-x $drawer-padding-y;
33 width: $drawer-width;
34 top: $fixed-header-y;
6ec7fb8d 35 height: calc(100% - #{$navbar-height});
ba5c5083 36 overflow-y: auto;
99061152
DW
37 -webkit-overflow-scrolling: touch;
38 z-index: $zindex-dropdown - 1;
3ec69c2e 39 background-color: darken($body-bg, 5%);
99061152 40 -webkit-transition: right 0.5s ease, left 0.5s ease;
947970fc
DM
41 -moz-transition: right 0.5s ease, left 0.5s ease;
42 transition: right 0.5s ease, left 0.5s ease;
99061152
DW
43}
44#nav-drawer {
45 right: auto;
947970fc 46 left: 0;
ca0e331c
KO
47
48 /* Override the z-indexes defined in bootstrap/_list-group.scss that
49 lead to side effects on the user tours positioning. */
50 .list-group-item-action.active,
51 .list-group-item.active {
52 z-index: inherit;
53 }
54 .list-group-item-action.active + .list-group-item,
55 .list-group-item.active + .list-group-item {
56 border-top: none;
57 }
99061152 58}
99061152
DW
59#page {
60 margin-top: $fixed-header-y;
61}
ba5c5083
DW
62.pagelayout-embedded #page {
63 margin-top: 0;
64}
99061152
DW
65body.drawer-ease {
66 -webkit-transition: margin-left 0.5s ease, margin-right 0.5s ease;
947970fc
DM
67 -moz-transition: margin-left 0.5s ease, margin-right 0.5s ease;
68 transition: margin-left 0.5s ease, margin-right 0.5s ease;
99061152
DW
69}
70
71body.drawer-open-left {
0a58ec24 72 @include media-breakpoint-up(md) {
99061152
DW
73 margin-left: $drawer-width;
74 }
75}
76body.drawer-open-right {
0a58ec24 77 @include media-breakpoint-up(md) {
99061152
DW
78 margin-right: $drawer-width;
79 }
80}