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: Adjusted grid HTML spacing. Created Nov. 9, 2016, 7:44 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') | no next file with comments »
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 .example
36 {
37 color: white;
38 background-color: black;
39 padding: 0.25em 0.5em;
40 margin: 0 0 1em 0;
41 }
42
43 .mobile
44 {
45 width: 540px;
46 }
47
48 .mobile .column,
49 .tablet .column
50 {
51 width: 100%;
52 }
53
54 .tablet
55 {
56 width: 720px;
57 }
58
59 .tablet .column.one-fourth
60 {
61 width: 50%;
62 }
63
64 .clearfix:after
65 {
66 content: "";
67 display: block;
68 clear: both;
69 }
70
71 </style>
72 </head>
73 <body>
74 <main class="container">
75
76 <h2>Grid</h2>
77 <ul>
78 <li>A grid is made up of rows of columns</li>
79 </ul>
80
81 <h3>Rows</h3>
82 <ul>
83 <li>Rows contain one or more columns</li>
84 <li>Rows clear columns</li>
85 <li>
86 Rows negate the the left & right padding of their first & last columns
87 <ul>
88 <li>While preserving consistent padding between columns</li>
89 </ul>
90 </li>
91 </ul>
92
93 <h4>Row with columns</h4>
94 <div class="row">
95 <div class="one-half column"><div class="example">This block is aligned wi th the above heading.</div></div>
96 <div class="one-half column"><div class="example">&nbsp;</div></div>
97 </div>
98
99 <h4>Container with columns</h4>
100 <div class="clearfix">
101 <div class="one-half column"><div class="example">This block is not aligne d with the above heading.</div></div>
102 <div class="one-half column"><div class="example">&nbsp;</div></div>
103 </div>
104
105 <h3>Columns</h3>
106 <ul>
107 <li>Columns are 100% width by default</li>
108 <li>Modifier classes are applied to columns to change their width</li>
109 <li>Modifier classes behave differently on different device widths</li>
110 </ul>
111
112 <div class="desktop">
113 <h4>Desktop</h4>
114 <div class="row">
115 <div class="one-half column"><div class="example">.one-half .column</div ></div>
116 <div class="one-half column"><div class="example">.one-half .column</div ></div>
117 </div>
118 <div class="row">
119 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
120 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
121 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
122 </div>
123 <div class="row">
124 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
125 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
126 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
127 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
128 </div>
129 </div>
130
131 <div class="tablet">
132 <h4>Tablet</h4>
133 <div class="row">
134 <div class="one-half column"><div class="example">.one-half .column</div ></div>
135 <div class="one-half column"><div class="example">.one-half .column</div ></div>
136 </div>
137 <div class="row">
138 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
139 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
140 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
141 </div>
142 <div class="row">
143 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
144 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
145 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
146 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
147 </div>
148 </div>
149
150 <div class="mobile">
151 <h4>Mobile</h4>
152 <div class="row">
153 <div class="one-half column"><div class="example">.one-half .column</div ></div>
154 <div class="one-half column"><div class="example">.one-half .column</div ></div>
155 </div>
156 <div class="row">
157 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
158 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
159 <div class="one-third column"><div class="example">.one-third .column</d iv></div>
160 </div>
161 <div class="row">
162 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
163 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
164 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
165 <div class="one-fourth column"><div class="example">.one-fourth .column< /div></div>
166 </div>
167 </div>
168
169 <h3>Direction</h3>
170 <ul>
171 <li>Columns within rows modified by the <code>.reverse</code> class appear in reverse order</li>
172 <li>Columns within sections modified by the <code>rtl</code> direction app ear in reverse order respectively</li>
173 </ul>
174
175 <h4>Reverse Row</h4>
176 <div class="row reverse">
177 <div class="one-half column"><div class="example">Column 1</div></div>
178 <div class="one-half column"><div class="example">Column 2</div></div>
179 </div>
180
181 <h4>RTL Row</h4>
182 <div dir="rtl">
183 <div class="row">
184 <div class="one-half column"><div class="example">Column 1</div></div>
185 <div class="one-half column"><div class="example">Column 2</div></div>
186 </div>
187 </div>
188
189 <h4>RTL Reverse Row</h4>
190 <div dir="rtl">
191 <div class="row reverse">
192 <div class="one-half column"><div class="example">Column 1</div></div>
193 <div class="one-half column"><div class="example">Column 2</div></div>
194 </div>
195 </div>
196
197 </main>
198 </body>
199 </html>
OLDNEW
« no previous file with comments | « no previous file | scss/_grid.scss » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld