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: Added grid and grid features to README.md Created Nov. 3, 2016, 5:58 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 | « README.md ('k') | 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>HTML Content</title>
25 <link rel="stylesheet" href="/css/main.css">
26 <style>
27 body
28 {
29 margin-bottom: 4em;
30 }
31
32 header
33 {
34 border-bottom: 1px solid lightgray;
35 margin-top: 4em !important;
36 margin-bottom: 1em !important;
37 }
38
39 .desktop
40 {
41 max-width: 992px;
42 }
43
44 .tablet
45 {
46 max-width: 768px;
47 }
48
49 .mobile
50 {
51 max-width: 576px;
52 }
53
54 .tablet .one-fourth
55 {
56 width: 50%;
57 }
58
59 .mobile .column
60 {
61 width: 100%;
62 }
63
64 .example
65 {
66 background-color: lightgray;
67 padding: 8px 16px;
68 margin-top: 16px;
69 margin-bottom: 16px;
70 border: 1px solid white;
71 }
72 </style>
73 </head>
74 <body>
75
76 <div class="container">
77 <header>
78 <h1>Grid component</h1>
79 </header>
80 <ol>
81 <li><a href="#sizes">Sizes</a></li>
82 <li><a href="#containers">Containers</a></li>
83 <li><a href="#columns">Columns</a></li>
84 <li><a href="#direction">Direction</a></li>
85 <li><a href="#pushing-and-pulling">Pushing & pulling</a></li>
86 </ol>
87 </div>
88
89 <section class="container">
90 <header>
91 <h2 id="sizes">Sizes</h2>
92 </header>
93 <p class="mobile example"><code>$mobile-breakpoint</code> - 576px</p>
94 <p class="tablet example"><code>$tablet-breakpoint</code> - 768px</p>
95 <p class="desktop example"><code>$desktop-breakpoint</code> - 992px</p>
96 </section>
97
98 <section>
99 <header class="container">
100 <h2 id="containers">Containers</h2>
101 </header>
102 <p class="container example"><code>.container</code> - device <a href="#size s">size</a>.</p>
103 <p class="container-fluid example"><code>.container-fluid</code> - 100%</p>
104 </section>
105
106 <div class="container">
107
108 <section>
109 <header>
110 <h2 id="columns">Columns</h2>
111 </header>
112 <p>Columns must be contained within one or more <code>.row</code>.</p>
113 <section>
114 <header>
115 <h3 id="columns-desktop">Desktop</h3>
116 </header>
117 <p>Up to four columns are supported on desktop.</p>
118
119 <section>
120 <h4 id="desktop-halfs">Halfs</h4>
121 <div class="row">
122 <div class="one-half column example"><code>.one-half .column</code>< /div>
123 <div class="one-half column example"><code>.one-half .column</code>< /div>
124 </div>
125 </section>
126
127 <section>
128 <h4 id="desktop-thirds">Thirds</h4>
129 <div class="row">
130 <div class="one-third column example"><code>.one-third .column</code ></div>
131 <div class="two-thirds column example"><code>.two-thirds .column</co de></div>
132 </div>
133 </section>
134
135 <section>
136 <h4 id="desktop-fourths">Fourths</h4>
137 <div class="row">
138 <div class="one-fourth column example"><code>.one-fourth .column</co de></div>
139 <div class="three-fourths column example"><code>.three-fourths .colu mn</code></div>
140 </div>
141 </section>
142 </section>
143
144 <section>
145 <header>
146 <h3 id="columns-tablet">Tablet</h3>
147 </header>
148 <p>Fourth columns collapse into half columns on tablets. All other colum ns (including .one-half) collapse into one.</p>
149 <div class="row tablet">
150 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
151 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
152 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
153 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
154 </div>
155 </section>
156
157 <section>
158 <header>
159 <h3 id="columns-mobile">Mobile</h3>
160 </header>
161 <p>All columns collapse into one on mobile.</p>
162 <div class="row mobile">
163 <div class="one-fourth column example"><code>.one-fourth .column</code ></div>
164 <div class="one-third column example"><code>.one-third .column</code>< /div>
165 <div class="one-half column example"><code>.one-half .column</code></d iv>
166 </div>
167 </section>
168 </section>
169
170 <section>
171 <header>
172 <h2 id="direction">Direction</h2>
173 </header>
174 <p>Columns flow according to parent direction.</p>
175
176 <section dir="ltr">
177 <h3>Left to right</h3>
178 <div class="row">
179 <div class="one-half column example">Column 1</div>
180 <div class="one-half column example">Column 2</div>
181 </div>
182 </section>
183
184 <section dir="rtl">
185 <h3>Right to left</h3>
186 <div class="row">
187 <div class="one-half column example">Column 1</div>
188 <div class="one-half column example">Column 2</div>
189 </div>
190 </section>
191 </section>
192
193 <section>
194 <header>
195 <h2 id="pushing-and-pulling">Pushing & pulling</h2>
196 </header>
197 <p>Use <code>.push-*-*</code> and <code>.pull-*-*</code> to push (forward) or pull (backward) a column.</p>
198 <p>This is useful for controling the order in which columns appear when th ey are collapsed.</p>
199 <div class="row">
200 <div class="one-half push-one-half column example"><code>.one-half .push -one-half column</code></div>
201 <div class="one-half pull-one-half column example"><code>.one-half .pull -one-half column</code></div>
202 </div>
203 </section>
204
205 </div>
206 <script src="/node_modules/anchor-js/anchor.js"></script>
207 <script>anchors.add("header h2, section h3");</script>
208 </body>
209 </html>
OLDNEW
« no previous file with comments | « README.md ('k') | scss/_grid.scss » ('j') | scss/_grid.scss » ('J')

Powered by Google App Engine
This is Rietveld