aboutsummaryrefslogtreecommitdiff
path: root/offcanvas/example.css
blob: 6dcd5ece1442c2d877ef446f8e35f8484204d4f6 (plain)
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
92
93
94
95
96
97
98
99
100
body {
  padding-top: 80px;
}
footer {
  padding-left: 15px;
  padding-right: 15px;
}

/*
 * Off canvas
 * -------------------------------------------------- */

.row-offcanvas {
  position: relative;
  overflow: hidden;
  -webkit-transition: all 0.25s ease-out;
     -moz-transition: all 0.25s ease-out;
          transition: all 0.25s ease-out;
}
.row-offcanvas.active {
  overflow: visible;
}
.row-offcanvas-right .sidebar-offcanvas {
  right: -210px; /* 60px * 3.5 = very small phones like 240x320 HTC Wildfire */
}
.row-offcanvas-left .sidebar-offcanvas {
  left: -210px; /* 60px * 3.5 = very small phones like 240x320 HTC Wildfire */
}
.row-offcanvas-right.active {
  right: 210px; /* 60px * 3.5 = very small phones like 240x320 HTC Wildfire */
}
.row-offcanvas-left.active {
  left: 210px; /* 60px * 3.5 = very small phones like 240x320 HTC Wildfire */
}
.sidebar-offcanvas {
  position: absolute;
  top: 0;
}

@media screen and (max-width: 319px) {
  /* This is here instead of being outside the media queries because when
   * we exit "mobile land", the sidebar needs to be able to restore its
   * originally authored ".col-lg-X" width. */
  .sidebar-offcanvas {
    width: 210px; /* 60px * 3.5 = very small phones like 240x320 HTC Wildfire */
  }
}

@media screen and (min-width: 320px) and (max-width: 480px) {
  .row-offcanvas-right .sidebar-offcanvas {
    right: -270px; /* 60px * 4.5 = average iPhones and Android phones */
  }
  .row-offcanvas-left .sidebar-offcanvas {
    left: -270px; /* 60px * 4.5 = average iPhones and Android phones */
  }
  .row-offcanvas-right.active {
    right: 270px; /* 60px * 4.5 = average iPhones and Android phones */
  }
  .row-offcanvas-left.active {
    left: 270px; /* 60px * 4.5 = average iPhones and Android phones */
  }
  .sidebar-offcanvas {
    width: 270px; /* 60px * 4.5 = average iPhones and Android phones */
  }
}

/* Landscape phone to tablets
 * -------------------------- */
@media screen and (min-width: 481px) and (max-width: 767px) {
  .row-offcanvas-right .sidebar-offcanvas {
    right: -480px; /* 60px * 8 = Tablets and wider */
  }
  .row-offcanvas-left .sidebar-offcanvas {
    left: -480px; /* 60px * 8 = Tablets and wider */
  }
  .row-offcanvas-right.active {
    right: 480px; /* 60px * 8 = Tablets and wider */
  }
  .row-offcanvas-left.active {
    left: 480px; /* 60px * 8 = Tablets and wider */
  }
  .sidebar-offcanvas {
    width: 480px; /* 60px * 8 = Tablets and wider */
  }
}

/* Tablets & above
 * ---------------- */
@media screen and (min-width: 768px) {
  .row-offcanvas {
    position: static;
    overflow: visible;
  }
  .sidebar-offcanvas {
    position: static;
  }
  .btn-offcanvas {
    display: none;
  }
}