This repository has been archived by the owner on Apr 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrid-systems.html
208 lines (198 loc) · 8.23 KB
/
grid-systems.html
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!--
Copyright 2014 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<h1>Grid systems</h1>
<p>Hippo Theme is based on Bootstrap and thus supports the default Bootstrap grid and its breakpoints.</p>
<h4>Short summary of Bootstrap grid options:</h4>
<table class="table table-bordered table-striped table-responsive">
<thead>
<tr>
<th></th>
<th>
Extra small devices
<small>Phones (<768px)</small>
</th>
<th>
Small devices
<small>Tablets (≥768px)</small>
</th>
<th>
Medium devices
<small>Desktops (≥992px)</small>
</th>
<th>
Large devices
<small>Desktops (≥1200px)</small>
</th>
</tr>
</thead>
<tbody>
<tr>
<th class="text-nowrap">Grid behavior</th>
<td>Horizontal at all times</td>
<td colspan="3">Collapsed to start, horizontal above breakpoints</td>
</tr>
<tr>
<th class="text-nowrap">Container width</th>
<td>None (auto)</td>
<td>750px</td>
<td>970px</td>
<td>1170px</td>
</tr>
<tr>
<th class="text-nowrap">Class prefix</th>
<td><code>.col-xs-</code></td>
<td><code>.col-sm-</code></td>
<td><code>.col-md-</code></td>
<td><code>.col-lg-</code></td>
</tr>
<tr>
<th class="text-nowrap"># of columns</th>
<td colspan="4">12</td>
</tr>
<tr>
<th class="text-nowrap">Column width</th>
<td class="text-muted">Auto</td>
<td>~62px</td>
<td>~81px</td>
<td>~97px</td>
</tr>
<tr>
<th class="text-nowrap">Gutter width</th>
<td colspan="4">30px (15px on each side of a column)</td>
</tr>
<tr>
<th class="text-nowrap">Nestable</th>
<td colspan="4">Yes</td>
</tr>
<tr>
<th class="text-nowrap">Offsets</th>
<td colspan="4">Yes</td>
</tr>
<tr>
<th class="text-nowrap">Column ordering</th>
<td colspan="4">Yes</td>
</tr>
</tbody>
</table>
</div>
<div class="col-xs-12">
<h4><em>Flex grid</em> based on the CSS flexbox module</h4>
<p>For a full explanation on flexbox look <a href="http://css-tricks.com/snippets/css/a-guide-to-flexbox/">here</a>.</p>
<p>A pane grid can be used as a 12 column grid with full height columns.
It is also <em>flexible</em>, as it uses a percentage of the viewport to scale the panes.</p>
<p>
Define the width by the number of columns, just like the bootstrap grid.
For example: <code>.flex-xs-6</code> will span 6 columns (half of the 12 column grid).
</p>
<p>
Offset the columns, just like the bootstrap grid.
For example: <code>.flex-offset-xs-6</code> will offset the element 6 columns to the right.
</p>
<p>Just like the bootstrap theme the grid has breakpoint variations allowing for different layouts per breakpoint.
<code>.flex-xs-*</code>, <code>.flex-sm-*</code>, <code>.flex-md-*</code> and <code>.flex-lg-*</code>
To hide a column from a specific breakpoint, use the class <code>.flex-{breakpoint}-hidden.</code></p>
<p>
The following classes are also available:
<ul>
<li>
To make a flex row with stretched columns:
<code>.flex-row</code>
</li>
<li>
To make a flex column with stretched rows:
<code>.flex-column</code>
</li>
<li>
To make a flex child that does not change dimensions when other childs change or get added:
<code>.solid-child</code>
</li>
<li>
To make a flex child that changes dimensions as other childs change or get added:
<code>.flex-child</code>
</li>
<li>
To fully stretch out a flex child disregarding any other childs:
<code>.flex-full</code>
</li>
<li>
To vertically and horizontally center any content in the flex child:
<code>.flex-center</code>
</li>
</ul>
</p>
<p>Try it out! Resize your viewport and see the below grids change and switch.</p>
</div>
<div class="col-xs-12">
<div class="panel panel-warning">
<div class="panel-heading">Flex grid</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-6">
<div class="flex-row" style="height: 300px;">
<div class="flex-xs-4 flex-sm-6 flex-md-2 flex-lg-6 bg-info flex-row">
<div class="flex-xs-6 flex-xs-offset-3 bg-warning"></div>
</div>
<div class="flex-xs-4 flex-sm-hidden flex-md-8 flex-lg-3 bg-success">
</div>
<div class="flex-xs-4 flex-sm-6 flex-md-2 flex-lg-3 bg-danger">
</div>
</div>
</div>
<div class="col-sm-6">
<pre>
<div class="flex-row" style="height: 300px;">
<div class="flex-xs-4 flex-sm-6 flex-md-2 flex-lg-6 bg-info flex-row">
<div class="flex-xs-8 flex-xs-offset-2 bg-warning"></div>
</div>
<div class="flex-xs-4 flex-sm-hidden flex-md-8 flex-lg-3 bg-success">
</div>
<div class="flex-xs-4 flex-sm-6 flex-md-2 flex-lg-3 bg-danger">
</div>
</div>
</pre>
<p>Note: Resize the viewport to see the grid change on different viewport widths</p>
</div>
</div>
</div>
</div>
<div class="panel panel-warning">
<div class="panel-heading">Center unknown child</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-6">
<div class="flex-center bg-info" style="height: 100px;">
<div class="bg-danger">
<p>This is inside the .center-content div</p>
<span class="loading-icon"></span>
</div>
</div>
</div>
<div class="col-sm-6">
<pre>
<div class="flex-center bg-info" style="height: 100px;">
<div class="bg-danger">
<p>This is inside the .center-content div</p>
<span class="loading-icon"></span>
</div>
</div>
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>