_offcanvas.scss 1.69 KB
Newer Older
Myriam Guedey's avatar
Myriam Guedey committed
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
.offcanvas {
  position: fixed;
  bottom: 0;
  z-index: $zindex-offcanvas;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  color: $offcanvas-color;
  visibility: hidden;
  background-color: $offcanvas-bg-color;
  background-clip: padding-box;
  outline: 0;
  @include box-shadow($offcanvas-box-shadow);
  @include transition(transform $offcanvas-transition-duration ease-in-out);
}

.offcanvas-header {
  display: flex;
  justify-content: space-between;
  padding: $offcanvas-padding-y $offcanvas-padding-x;

  .btn-close {
    padding: ($offcanvas-padding-y / 2) ($offcanvas-padding-x / 2);
    margin: ($offcanvas-padding-y / -2) ($offcanvas-padding-x / -2) ($offcanvas-padding-y / -2) auto;
  }
}

.offcanvas-title {
  margin-bottom: 0;
  line-height: $offcanvas-title-line-height;
}

.offcanvas-body {
  flex-grow: 1;
  padding: $offcanvas-padding-y $offcanvas-padding-x;
  overflow-y: auto;
}

.offcanvas-start {
  top: 0;
  left: 0;
  width: $offcanvas-horizontal-width;
  border-right: $offcanvas-border-width solid $offcanvas-border-color;
  transform: translateX(-100%);
}

.offcanvas-end {
  top: 0;
  right: 0;
  width: $offcanvas-horizontal-width;
  border-left: $offcanvas-border-width solid $offcanvas-border-color;
  transform: translateX(100%);
}

.offcanvas-bottom {
  right: 0;
  left: 0;
  height: $offcanvas-vertical-height;
  max-height: 100%;
  border-top: $offcanvas-border-width solid $offcanvas-border-color;
  transform: translateY(100%);
}

.offcanvas.show {
  transform: none;
}

.offcanvas-backdrop::before {
  position: fixed;
  top: 0;
  left: 0;
  z-index: $zindex-offcanvas - 1;
  width: 100vw;
  height: 100vh;
  content: "";
  background-color: $offcanvas-body-backdrop-color;
}