Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: html/grid.html

Issue 29361708: Issue 4609 - Default grid component (Closed)
Patch Set: Fixed one-half one-fourth mix-up, added units to 0s, and adjusted content hirarchy Created Nov. 8, 2016, 4:08 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scss/_grid.scss » ('j') | scss/_grid.scss » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 This file is part of universal-design-language
4 Copyright (C) 2016 Eyeo GmbH
5
6 universal-design-language is free software: you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 universal-design-language is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with web.starter-kit. If not, see <http://www.gnu.org/licenses/>.
18 -->
19 <html dir="ltr">
20 <head>
21 <meta charset="utf-8">
22 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to- fit=no">
23 <meta http-equiv="x-ua-compatible" content="ie=edge">
24 <title>Grid</title>
25 <link rel="stylesheet" href="/css/main.css">
26 <style>
27
28 /* NOTE: The following inline styles are meant for this demo **only**. */
29
30 body
31 {
32 margin-bottom: 3em;
33 }
34
35 header
36 {
37 border-bottom: 2px solid gray;
38 }
39
40 .desktop
41 {
42 max-width: 992px;
43 }
44
45 .tablet
46 {
47 max-width: 768px;
48 }
49
50 .mobile
51 {
52 max-width: 576px;
53 }
54
55 @media(min-width: 576px)
56 {
57 .tablet .one-fourth
58 {
59 width: 50%;
60 }
61 }
62
63 .mobile .column
64 {
65 width: 100%;
66 }
67
68 .example
69 {
70 background-color: lightgray;
71 padding: 8px 16px;
72 margin-top: 16px;
73 margin-bottom: 16px;
74 border: 1px solid white;
75 }
76
77 </style>
78 </head>
79 <body>
80
81 <div class="container">
82 <h1>Grid</h1>
83 </div>
84
85 <section class="container">
86 <header>
87 <h3>Sizes</h3>
88 </header>
89 <p class="mobile example"><code>$mobile-breakpoint</code> - 576px</p>
90 <p class="tablet example"><code>$tablet-breakpoint</code> - 768px</p>
91 <p class="desktop example"><code>$desktop-breakpoint</code> - 992px</p>
92 </section>
93
94 <section>
95 <header class="container">
96 <h3>Containers</h3>
97 </header>
98 <p class="container example"><code>.container</code> - device <a href="#size s">size</a>.</p>
99 <p class="container-fluid example"><code>.container-fluid</code> - 100%</p>
100 </section>
101
102 <div class="container">
103
104 <section>
105
106 <h3>Columns</h3>
107 <p>Columns must be contained within one or more <code>.row</code>.</p>
108
109 <section>
110 <header>
111 <h4>Desktop</h4>
112 </header>
113 <p>Up to four columns are supported on desktop.</p>
114
115 <section>
116 <h5>Halfs</h5>
117 <div class="row">
118 <div class="one-half column example"><code>.one-half .column</code>< /div>
119 <div class="one-half column example"><code>.one-half .column</code>< /div>
120 </div>
121 </section>
122
123 <section>
124 <h5>Thirds</h5>
125 <div class="row">
126 <div class="one-third column example"><code>.one-third .column</code ></div>
127 <div class="two-thirds column example"><code>.two-thirds .column</co de></div>
128 </div>
129 </section>
130
131 <section>
132 <h5>Fourths</h5>
133 <div class="row">
134 <div class="one-fourth column example"><code>.one-fourth .column</co de></div>
135 <div class="three-fourths column example"><code>.three-fourths .colu mn</code></div>
136 </div>
137 </section>
138 </section>
139
140 <section>
141 <header>
142 <h4>Tablet</h4>
143 </header>
144 <p>Fourth columns collapse into half columns on tablets. All other colum ns (including .one-half) collapse into one.</p>
145 <div class="row tablet">
146 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
147 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
148 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
149 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
150 </div>
151 </section>
152
153 <section>
154 <header>
155 <h4>Mobile</h4>
156 </header>
157 <p>All columns collapse into one on mobile.</p>
158 <div class="row mobile">
159 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
160 <div class="one-third column example"><code>.one-third .column</code>< /div>
161 <div class="one-half column example"><code>.one-half .column</code></d iv>
162 </div>
163 </section>
164 </section>
165
166 <section>
167 <header>
168 <h3>Direction</h3>
169 </header>
170 <p>Columns flow according to parent direction.</p>
171
172 <section dir="ltr">
173 <h4>Left to right</h4>
174 <div class="row">
175 <div class="one-half column example">Column 1</div>
176 <div class="one-half column example">Column 2</div>
177 </div>
178 </section>
179
180 <section dir="rtl">
181 <h4>Right to left</h4>
182 <div class="row">
183 <div class="one-half column example">Column 1</div>
184 <div class="one-half column example">Column 2</div>
185 </div>
186 </section>
187 </section>
188
189 <section>
190 <header>
191 <h3>Pushing & pulling</h3>
192 </header>
193 <p>Use <code>.push-*-*</code> and <code>.pull-*-*</code> to push (forward) or pull (backward) a column.</p>
194 <p>This is useful for controling the order in which columns appear when th ey are collapsed.</p>
195 <div class="row">
196 <div class="one-half push-one-half column example"><code>.one-half .push -one-half column</code></div>
197 <div class="one-half pull-one-half column example"><code>.one-half .pull -one-half column</code></div>
198 </div>
199 </section>
200
201 </div>
202 </body>
203 </html>
OLDNEW
« no previous file with comments | « no previous file | scss/_grid.scss » ('j') | scss/_grid.scss » ('J')

Powered by Google App Engine
This is Rietveld