aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/sass/base/_layout.scss
blob: f6fa5a5f5e517c160455c08ea9aaa2a375360915 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
$max-width: 1200px !default;

// Padding used for layout margins
$pad-min: 18px !default;
$pad-narrow: 25px !default;
$pad-medium: 35px !default;
$pad-wide: 55px !default;

// Sidebar widths used in media queries
$sidebar-width-medium: 240px !default;
$sidebar-pad-medium: 15px !default;
$sidebar-pad-wide: 20px !default;
$sidebar-width-wide: 300px !default;

$indented-lists: false !default;

.group { @include pie-clearfix; }

@mixin collapse-sidebar {
  float: none;
  width: auto;
  clear: left;
  margin: 0;
  padding: 0 $pad-medium 1px;
  background-color: lighten($sidebar-bg, 2);
  border-top: 1px solid lighten($sidebar-border, 4);
  section {
    &.odd, &.even { float: left; width: 48%; }
    &.odd { margin-left: 0; }
    &.even { margin-left: 4%; }
  }
  &.thirds section {
    width: 30%;
    margin-left: 5%;
    &.first { margin-left: 0; }
  }
}

body {
  -webkit-text-size-adjust: none;
  max-width: $max-width;
  position: relative;
  margin: 0 auto;
  > header, > nav, > footer, #content > article, #content > div > article, #content > div > section, nav[role=pagination] {
    @extend .group;
    padding-left: $pad-min;
    padding-right: $pad-min;
    @media only screen and (min-width: 480px) {
      padding-left: $pad-narrow;
      padding-right: $pad-narrow;
    }
    @media only screen and (min-width: 768px) {
      padding-left: $pad-medium;
      padding-right: $pad-medium;
    }
    @media only screen and (min-width: 992px) {
      padding-left: $pad-wide;
      padding-right: $pad-wide;
    }
  }
  > header {
    font-size: 1em;
    padding-top: 1.5em;
    padding-bottom: 1.5em;
  }
}

#content { > div, > article { width: 100%; }}

aside[role=sidebar] {
  float: none;
  padding: 0 $pad-min 1px;
  background-color: lighten($sidebar-bg, 2);
  border-top: 1px solid $sidebar-border;
  @extend .group;
}

.flex-content { max-width: 100%; height: auto; }

.basic-alignment {
  &.left { float: left; margin-right: 1.5em; }
  &.right { float: right; margin-left: 1.5em; }
  &.center { display:block; margin: 0 auto 1.5em; }
  &.left, &.right { margin-bottom: .8em; }
}

.toggle-sidebar { &, .no-sidebar & { display: none; }}

body.sidebar-footer {
  @media only screen and (min-width: 750px) {
    aside[role=sidebar]{ @include collapse-sidebar; }
  }
  #content { margin-right: 0px; }
  .toggle-sidebar { display: none; }
}

@media only screen and (min-width: 550px) {
  body > header { font-size: 1em; }
}
@media only screen and (min-width: 750px) {
  aside[role=sidebar] { @include collapse-sidebar; }
}
@media only screen and (min-width: 768px) {
  body { -webkit-text-size-adjust: auto; }
  body > header { font-size: 1.2em; }
  #main {
    @extend .group;
    padding: 0;
    margin: 0 auto;
  }
  #content {
    @extend .group;
    margin-right: $sidebar-width-medium;
    position: relative;
    .no-sidebar & { margin-right: 0; }
    .collapse-sidebar & { margin-right: 20px; }
    > div, > article {
      padding-top: $pad-medium/2;
      padding-bottom: $pad-medium/2;
      float: left;
    }
  }
  aside[role=sidebar] {
    @extend .group;
    width: $sidebar-width-medium - $sidebar-pad-medium*2;
    padding: 0 $sidebar-pad-medium $sidebar-pad-medium;
    background: none;
    clear: none;
    float: left;
    margin: 0 -100% 0 0;
    section {
      width: auto; margin-left: 0;
      &.odd, &.even { float: none; width: auto; margin-left: 0; }
    }
    .collapse-sidebar & {
      @include collapse-sidebar;
    }
  }
}

@media only screen and (min-width: 992px) {
  body > header { font-size: 1.3em; }
  #content { margin-right: $sidebar-width-wide; }
  #content {
    > div, > article {
      padding-top: $pad-wide/2;
      padding-bottom: $pad-wide/2;
    }
  }
  aside[role=sidebar] {
    width: $sidebar-width-wide - $sidebar-pad-wide*2;
    padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide;
    .collapse-sidebar & {
      padding: { left: $pad-wide; right: $pad-wide; }
      @extend .group;
    }
  }
}

@if $indented-lists == false {
  @media only screen and (min-width: 768px) {
    ul, ol { margin-left: 0; }
  }
}