1
|
/**
|
2
|
* @file
|
3
|
* Positioning for responsive layout .
|
4
|
*
|
5
|
* Define CSS classes to create a table-free, 3-column, 2-column, or single
|
6
|
* column layout depending on whether blocks are enabled in the left or right
|
7
|
* columns.
|
8
|
*
|
9
|
* This layout uses the Zen Grids plugin for Compass: http://zengrids.com
|
10
|
*/
|
11
|
|
12
|
/*
|
13
|
* Center the page.
|
14
|
*/
|
15
|
|
16
|
#page,
|
17
|
.region-bottom {
|
18
|
/* For screen sizes larger than 1200px, prevent excessively long lines of text
|
19
|
by setting a max-width. */
|
20
|
margin-left: auto;
|
21
|
margin-right: auto;
|
22
|
max-width: 1200px;
|
23
|
}
|
24
|
|
25
|
/*
|
26
|
* Apply the shared properties of grid items in a single, efficient ruleset.
|
27
|
*/
|
28
|
|
29
|
#header,
|
30
|
#content,
|
31
|
#navigation,
|
32
|
.region-sidebar-first,
|
33
|
.region-sidebar-second,
|
34
|
#footer {
|
35
|
padding-left: 10px;
|
36
|
padding-right: 10px;
|
37
|
-moz-box-sizing: border-box;
|
38
|
-webkit-box-sizing: border-box;
|
39
|
-ms-box-sizing: border-box;
|
40
|
box-sizing: border-box;
|
41
|
word-wrap: break-word;
|
42
|
_display: inline;
|
43
|
_overflow: hidden;
|
44
|
_overflow-y: visible;
|
45
|
}
|
46
|
|
47
|
/*
|
48
|
* Containers for grid items and flow items.
|
49
|
*/
|
50
|
|
51
|
#header,
|
52
|
#main,
|
53
|
#footer {
|
54
|
*position: relative;
|
55
|
*zoom: 1;
|
56
|
}
|
57
|
#header:before, #header:after,
|
58
|
#main:before, #main:after,
|
59
|
#footer:before, #footer:after {
|
60
|
content: "";
|
61
|
display: table;
|
62
|
}
|
63
|
#header:after,
|
64
|
#main:after,
|
65
|
#footer:after {
|
66
|
clear: both;
|
67
|
}
|
68
|
|
69
|
/*
|
70
|
* Navigation bar
|
71
|
*/
|
72
|
|
73
|
@media all and (min-width: 480px) {
|
74
|
#main {
|
75
|
padding-top: 3em; /* Move all the children of #main down to make room. */
|
76
|
position: relative;
|
77
|
}
|
78
|
|
79
|
#navigation {
|
80
|
position: absolute;
|
81
|
top: 0; /* Move the navbar up inside #main's padding. */
|
82
|
height: 3em;
|
83
|
width: 100%;
|
84
|
}
|
85
|
}
|
86
|
|
87
|
/*
|
88
|
* Use 3 grid columns for smaller screens.
|
89
|
*/
|
90
|
|
91
|
@media all and (min-width: 480px) and (max-width: 959px) {
|
92
|
|
93
|
/*
|
94
|
* The layout when there is only one sidebar, the left one.
|
95
|
*/
|
96
|
|
97
|
.sidebar-first #content { /* Span 2 columns, starting in 2nd column from left. */
|
98
|
float: left;
|
99
|
width: 66.667%;
|
100
|
margin-left: 33.333%;
|
101
|
margin-right: -100%;
|
102
|
}
|
103
|
.sidebar-first .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
|
104
|
float: left;
|
105
|
width: 33.333%;
|
106
|
margin-left: 0%;
|
107
|
margin-right: -33.333%;
|
108
|
}
|
109
|
|
110
|
/*
|
111
|
* The layout when there is only one sidebar, the right one.
|
112
|
*/
|
113
|
|
114
|
.sidebar-second #content { /* Span 2 columns, starting in 1st column from left. */
|
115
|
float: left;
|
116
|
width: 66.667%;
|
117
|
margin-left: 0%;
|
118
|
margin-right: -66.667%;
|
119
|
}
|
120
|
.sidebar-second .region-sidebar-second { /* Span 1 column, starting in 3rd column from left. */
|
121
|
float: left;
|
122
|
width: 33.333%;
|
123
|
margin-left: 66.667%;
|
124
|
margin-right: -100%;
|
125
|
}
|
126
|
|
127
|
/*
|
128
|
* The layout when there are two sidebars.
|
129
|
*/
|
130
|
|
131
|
.two-sidebars #content { /* Span 2 columns, starting in 2nd column from left. */
|
132
|
float: left;
|
133
|
width: 66.667%;
|
134
|
margin-left: 33.333%;
|
135
|
margin-right: -100%;
|
136
|
}
|
137
|
.two-sidebars .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
|
138
|
float: left;
|
139
|
width: 33.333%;
|
140
|
margin-left: 0%;
|
141
|
margin-right: -33.333%;
|
142
|
}
|
143
|
.two-sidebars .region-sidebar-second { /* Start a new row and span all 3 columns. */
|
144
|
float: left;
|
145
|
width: 100%;
|
146
|
margin-left: 0%;
|
147
|
margin-right: -100%;
|
148
|
*position: relative;
|
149
|
*zoom: 1;
|
150
|
padding-left: 0;
|
151
|
padding-right: 0;
|
152
|
clear: left;
|
153
|
}
|
154
|
.two-sidebars .region-sidebar-second:before,
|
155
|
.two-sidebars .region-sidebar-second:after {
|
156
|
content: "";
|
157
|
display: table;
|
158
|
}
|
159
|
.two-sidebars .region-sidebar-second:after {
|
160
|
clear: both;
|
161
|
}
|
162
|
.two-sidebars .region-sidebar-second .block {
|
163
|
padding-left: 10px;
|
164
|
padding-right: 10px;
|
165
|
-moz-box-sizing: border-box;
|
166
|
-webkit-box-sizing: border-box;
|
167
|
-ms-box-sizing: border-box;
|
168
|
box-sizing: border-box;
|
169
|
word-wrap: break-word;
|
170
|
_display: inline;
|
171
|
_overflow: hidden;
|
172
|
_overflow-y: visible;
|
173
|
}
|
174
|
.two-sidebars .region-sidebar-second .block:nth-child(3n+1) { /* Span 1 column, starting in the 1st column from left. */
|
175
|
float: left;
|
176
|
width: 33.333%;
|
177
|
margin-left: 0%;
|
178
|
margin-right: -33.333%;
|
179
|
clear: left;
|
180
|
}
|
181
|
.two-sidebars .region-sidebar-second .block:nth-child(3n+2) { /* Span 1 column, starting in the 2nd column from left. */
|
182
|
float: left;
|
183
|
width: 33.333%;
|
184
|
margin-left: 33.333%;
|
185
|
margin-right: -66.667%;
|
186
|
}
|
187
|
.two-sidebars .region-sidebar-second .block:nth-child(3n) { /* Span 1 column, starting in the 3rd column from left. */
|
188
|
float: left;
|
189
|
width: 33.333%;
|
190
|
margin-left: 66.667%;
|
191
|
margin-right: -100%;
|
192
|
}
|
193
|
}
|
194
|
|
195
|
/*
|
196
|
* Use 5 grid columns for larger screens.
|
197
|
*/
|
198
|
|
199
|
@media all and (min-width: 960px) {
|
200
|
|
201
|
/*
|
202
|
* The layout when there is only one sidebar, the left one.
|
203
|
*/
|
204
|
|
205
|
.sidebar-first #content { /* Span 4 columns, starting in 2nd column from left. */
|
206
|
float: left;
|
207
|
width: 80%;
|
208
|
margin-left: 20%;
|
209
|
margin-right: -100%;
|
210
|
}
|
211
|
.sidebar-first .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
|
212
|
float: left;
|
213
|
width: 20%;
|
214
|
margin-left: 0%;
|
215
|
margin-right: -20%;
|
216
|
}
|
217
|
|
218
|
/*
|
219
|
* The layout when there is only one sidebar, the right one.
|
220
|
*/
|
221
|
|
222
|
.sidebar-second #content { /* Span 4 columns, starting in 1st column from left. */
|
223
|
float: left;
|
224
|
width: 80%;
|
225
|
margin-left: 0%;
|
226
|
margin-right: -80%;
|
227
|
}
|
228
|
.sidebar-second .region-sidebar-second { /* Span 1 column, starting in 5th column from left. */
|
229
|
float: left;
|
230
|
width: 20%;
|
231
|
margin-left: 80%;
|
232
|
margin-right: -100%;
|
233
|
}
|
234
|
|
235
|
/*
|
236
|
* The layout when there are two sidebars.
|
237
|
*/
|
238
|
|
239
|
.two-sidebars #content { /* Span 3 columns, starting in 2nd column from left. */
|
240
|
float: left;
|
241
|
width: 60%;
|
242
|
margin-left: 20%;
|
243
|
margin-right: -80%;
|
244
|
}
|
245
|
.two-sidebars .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
|
246
|
float: left;
|
247
|
width: 20%;
|
248
|
margin-left: 0%;
|
249
|
margin-right: -20%;
|
250
|
}
|
251
|
.two-sidebars .region-sidebar-second { /* Span 1 column, starting in 5th column from left. */
|
252
|
float: left;
|
253
|
width: 20%;
|
254
|
margin-left: 80%;
|
255
|
margin-right: -100%;
|
256
|
}
|
257
|
}
|