Merge lp:~daker/ubuntu-html5-theme/grid-system2 into lp:ubuntu-html5-theme
- grid-system2
- Merge into trunk
Proposed by
Adnane Belmadiaf
Status: | Needs review |
---|---|
Proposed branch: | lp:~daker/ubuntu-html5-theme/grid-system2 |
Merge into: | lp:ubuntu-html5-theme |
Diff against target: |
405 lines (+391/-0) (has conflicts) 3 files modified
0.1/ambiance/css/default.css.OTHER (+89/-0) 0.1/ambiance/css/grid.css (+194/-0) examples/html5-theme/widgets/Grid.html (+108/-0) Contents conflict in 0.1/ambiance/css/default.css |
To merge this branch: | bzr merge lp:~daker/ubuntu-html5-theme/grid-system2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandre Abreu | Needs Information | ||
Review via email: mp+204806@code.launchpad.net |
Commit message
Added a new flexbox grid system
Description of the change
To post a comment you must log in.
- 125. By Adnane Belmadiaf
-
Fixes
- 126. By Adnane Belmadiaf
-
Fixes
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote : | # |
review:
Needs Information
Unmerged revisions
- 126. By Adnane Belmadiaf
-
Fixes
- 125. By Adnane Belmadiaf
-
Fixes
- 124. By Adnane Belmadiaf
-
Added a new flexbox grid system
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file '0.1/ambiance/css/default.css.OTHER' |
2 | --- 0.1/ambiance/css/default.css.OTHER 1970-01-01 00:00:00 +0000 |
3 | +++ 0.1/ambiance/css/default.css.OTHER 2014-05-31 13:56:38 +0000 |
4 | @@ -0,0 +1,89 @@ |
5 | +/* |
6 | + * Copyright (C) 2013 Adnane Belmadiaf <daker@ubuntu.com> |
7 | + * License granted by Canonical Limited |
8 | + * |
9 | + * This file is part of ubuntu-html5-ui-toolkit. |
10 | + * |
11 | + * This package is free software; you can redistribute it and/or modify |
12 | + * it under the terms of the GNU Lesser General Public License as |
13 | + * published by the Free Software Foundation; either version 3 of the |
14 | + * License, or |
15 | + * (at your option) any later version. |
16 | + |
17 | + * This package is distributed in the hope that it will be useful, |
18 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | + * GNU General Public License for more details. |
21 | + |
22 | + * You should have received a copy of the GNU Lesser General Public |
23 | + * License along with this program. If not, see |
24 | + * <http://www.gnu.org/licenses/> |
25 | + */ |
26 | + |
27 | +@import url("reset.css"); |
28 | +@import url("tabs.css"); |
29 | +@import url("pagestack.css"); |
30 | +@import url("text-input.css"); |
31 | +@import url("progress-bars.css"); |
32 | +@import url("dialogs.css"); |
33 | +@import url("buttons.css"); |
34 | +@import url("sliders.css"); |
35 | +@import url("toggles.css"); |
36 | +@import url("popover.css"); |
37 | +@import url("listitems.css"); |
38 | +@import url("toolbars.css"); |
39 | +@import url("shapes.css"); |
40 | +@import url("indexbar.css"); |
41 | +@import url("option-selector.css"); |
42 | +@import url("grid.css"); |
43 | + |
44 | + |
45 | +* { |
46 | + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); |
47 | +} |
48 | + |
49 | +body { |
50 | + background: #ededf0 url("../img/background_paper@30.png") repeat top left; |
51 | + font-family: Ubuntu; |
52 | + font-weight: normal; |
53 | +} |
54 | + |
55 | +[data-role="content"] { |
56 | + background: #ededf0 url("../img/background_paper@30.png") repeat top left; |
57 | + border-top: 1px solid #f0f0f0; |
58 | + height: auto; |
59 | + min-height: auto; |
60 | + width: 100%; |
61 | + font-size: 1rem "Ubuntu"; |
62 | + color: #787878; |
63 | +} |
64 | + |
65 | +[data-role="content"] p { |
66 | + font: 0.9rem "Ubuntu"; |
67 | + color: #787878; |
68 | +} |
69 | + |
70 | +[data-role="content"] h1, |
71 | +[data-role="content"] h2, |
72 | +[data-role="content"] h3 { |
73 | + color: #747278; |
74 | + font: 1.3rem "Ubuntu Light"; |
75 | + font-weight: bold; |
76 | +} |
77 | + |
78 | +[data-role="content"] h2 { |
79 | + font-size: 1.1rem; |
80 | +} |
81 | + |
82 | +[data-role="content"] h3 { |
83 | + font-size: 0.9rem; |
84 | +} |
85 | + |
86 | +[data-role="content"] img { |
87 | + margin: 0 auto; |
88 | + max-width: 98%; |
89 | +} |
90 | + |
91 | +.inset { |
92 | + margin-bottom: 10px; |
93 | +} |
94 | |
95 | === added file '0.1/ambiance/css/grid.css' |
96 | --- 0.1/ambiance/css/grid.css 1970-01-01 00:00:00 +0000 |
97 | +++ 0.1/ambiance/css/grid.css 2014-05-31 13:56:38 +0000 |
98 | @@ -0,0 +1,194 @@ |
99 | +/* |
100 | + * Copyright (C) 2014 Adnane Belmadiaf <daker@ubuntu.com> |
101 | + * License granted by Canonical Limited |
102 | + * |
103 | + * This file is part of ubuntu-html5-ui-toolkit. |
104 | + * |
105 | + * This package is free software; you can redistribute it and/or modify |
106 | + * it under the terms of the GNU Lesser General Public License as |
107 | + * published by the Free Software Foundation; either version 3 of the |
108 | + * License, or |
109 | + * (at your option) any later version. |
110 | + |
111 | + * This package is distributed in the hope that it will be useful, |
112 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
113 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
114 | + * GNU General Public License for more details. |
115 | + |
116 | + * You should have received a copy of the GNU Lesser General Public |
117 | + * License along with this program. If not, see |
118 | + * <http://www.gnu.org/licenses/>. |
119 | + */ |
120 | + |
121 | +[data-role="grid"] { |
122 | + |
123 | +} |
124 | + |
125 | +[data-role="row"] { |
126 | + display: -webkit-box; |
127 | + display: -webkit-flex; |
128 | + display: flex; |
129 | + -webkit-flex-wrap: wrap; |
130 | + flex-wrap: wrap; |
131 | + width: 100%; |
132 | +} |
133 | + |
134 | +.c { |
135 | + padding: 5px; |
136 | + border-radius: 4px; |
137 | + border: 1px solid #dbdbdb; |
138 | + background-color: #f2f2f2; |
139 | + text-align: center; |
140 | +} |
141 | + |
142 | +[data-role="row"] + [data-role="row"] { |
143 | + margin-top: 10px; |
144 | + margin-bottom: 10px; |
145 | +} |
146 | + |
147 | +[data-role="column"] { |
148 | + -webkit-box-flex: 1; |
149 | + -webkit-flex: 1; |
150 | + flex: 1; |
151 | + display: block; |
152 | + padding: 5px; |
153 | + width: 100%; |
154 | +} |
155 | + |
156 | +[data-role="row"][data-align="top"] { |
157 | + -webkit-box-align: start; |
158 | + -webkit-align-items: flex-start; |
159 | + align-items: flex-start; |
160 | +} |
161 | + |
162 | +[data-role="row"][data-align="bottom"] { |
163 | + -webkit-box-align: end; |
164 | + -webkit-align-items: flex-end; |
165 | + align-items: flex-end; |
166 | +} |
167 | + |
168 | +[data-role="row"][data-align="center"] { |
169 | + -webkit-box-align: center; |
170 | + -webkit-align-items: center; |
171 | + align-items: center; |
172 | +} |
173 | + |
174 | +[data-role="column"][data-align="top"] { |
175 | + -webkit-align-self: flex-start; |
176 | + align-self: flex-start; |
177 | +} |
178 | + |
179 | +[data-role="column"][data-align="bottom"] { |
180 | + -webkit-align-self: flex-end; |
181 | + align-self: flex-end; |
182 | +} |
183 | + |
184 | +[data-role="column"][data-align="center"] { |
185 | + -webkit-align-self: center; |
186 | + align-self: center; |
187 | +} |
188 | + |
189 | +/* Column Offsets */ |
190 | +[data-role="column"][data-offset="10"] { |
191 | + margin-left: 10%; |
192 | +} |
193 | + |
194 | +[data-role="column"][data-offset="20"] { |
195 | + margin-left: 20%; |
196 | +} |
197 | + |
198 | +[data-role="column"][data-offset="25"] { |
199 | + margin-left: 25%; |
200 | +} |
201 | + |
202 | +[data-role="column"][data-offset="33"], |
203 | +[data-role="column"][data-offset="34"] { |
204 | + margin-left: 33.3333%; |
205 | +} |
206 | + |
207 | +[data-role="column"][data-offset="50"] { |
208 | + margin-left: 50%; |
209 | +} |
210 | + |
211 | +[data-role="column"][data-offset="66"], |
212 | +[data-role="column"][data-offset="67"] { |
213 | + margin-left: 66.6666%; |
214 | +} |
215 | + |
216 | +[data-role="column"][data-offset="75"] { |
217 | + margin-left: 75%; |
218 | +} |
219 | + |
220 | +[data-role="column"][data-offset="80"] { |
221 | + margin-left: 80%; |
222 | +} |
223 | + |
224 | +[data-role="column"][data-offset="90"] { |
225 | + margin-left: 90%; |
226 | +} |
227 | + |
228 | + |
229 | +[data-role="column"][data-size="10"] { |
230 | + -webkit-box-flex: 0; |
231 | + -webkit-flex: 0 0 10%; |
232 | + flex: 0 0 10%; |
233 | + max-width: 10%; |
234 | +} |
235 | + |
236 | +[data-role="column"][data-size="20"] { |
237 | + -webkit-box-flex: 0; |
238 | + -webkit-flex: 0 0 20%; |
239 | + flex: 0 0 20%; |
240 | + max-width: 20%; |
241 | +} |
242 | + |
243 | +[data-role="column"][data-size="25"] { |
244 | + -webkit-box-flex: 0; |
245 | + -webkit-flex: 0 0 25%; |
246 | + flex: 0 0 25%; |
247 | + max-width: 25%; |
248 | +} |
249 | + |
250 | +[data-role="column"][data-size="33"], |
251 | +[data-role="column"][data-size="34"] { |
252 | + -webkit-box-flex: 0; |
253 | + -webkit-flex: 0 0 33.3333%; |
254 | + flex: 0 0 33.3333%; |
255 | + max-width: 33.3333%; |
256 | +} |
257 | + |
258 | +[data-role="column"][data-size="50"] { |
259 | + -webkit-box-flex: 0; |
260 | + -webkit-flex: 0 0 50%; |
261 | + flex: 0 0 50%; |
262 | + max-width: 50%; |
263 | +} |
264 | + |
265 | +[data-role="column"][data-size="66"], |
266 | +[data-role="column"][data-size="67"] { |
267 | + -webkit-box-flex: 0; |
268 | + -webkit-flex: 0 0 66.6666%; |
269 | + flex: 0 0 66.6666%; |
270 | + max-width: 66.6666%; |
271 | +} |
272 | + |
273 | +[data-role="column"][data-size="75"] { |
274 | + -webkit-box-flex: 0; |
275 | + -webkit-flex: 0 0 75%; |
276 | + flex: 0 0 75%; |
277 | + max-width: 75%; |
278 | +} |
279 | + |
280 | +[data-role="column"][data-size="80"] { |
281 | + -webkit-box-flex: 0; |
282 | + -webkit-flex: 0 0 80%; |
283 | + flex: 0 0 80%; |
284 | + max-width: 80%; |
285 | +} |
286 | + |
287 | +[data-role="column"][data-size="90"] { |
288 | + -webkit-box-flex: 0; |
289 | + -webkit-flex: 0 0 90%; |
290 | + flex: 0 0 90%; |
291 | + max-width: 90%; |
292 | +} |
293 | |
294 | === added file 'examples/html5-theme/widgets/Grid.html' |
295 | --- examples/html5-theme/widgets/Grid.html 1970-01-01 00:00:00 +0000 |
296 | +++ examples/html5-theme/widgets/Grid.html 2014-05-31 13:56:38 +0000 |
297 | @@ -0,0 +1,108 @@ |
298 | +<!-- |
299 | + Copyright (C) 2013 Adnane Belmadiaf <daker@ubuntu.com> |
300 | + License granted by Canonical Limited |
301 | + |
302 | + This file is part of ubuntu-html5-theme. |
303 | + |
304 | + This package is free software; you can redistribute it and/or modify |
305 | + it under the terms of the GNU Lesser General Public License as |
306 | + published by the Free Software Foundation; either version 3 of the |
307 | + License, or |
308 | + (at your option) any later version. |
309 | + |
310 | + This package is distributed in the hope that it will be useful, |
311 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
312 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
313 | + GNU General Public License for more details. |
314 | + |
315 | + You should have received a copy of the GNU Lesser General Public |
316 | + License along with this program. If not, see |
317 | + <http://www.gnu.org/licenses/>. |
318 | +--> |
319 | + |
320 | +<!DOCTYPE html> |
321 | +<html> |
322 | +<head> |
323 | + <meta charset="utf-8" /> |
324 | + <meta name="copyright" content="Adnane Belmadiaf <daker@ubuntu.com>"> |
325 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
326 | + <title>Ubuntu UI HTML5 Theme: Grid</title> |
327 | + <link href="../../../0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" /> |
328 | +</head> |
329 | +<body> |
330 | + <div data-role="mainview"> |
331 | + <header data-role="header"> |
332 | + <ul data-role="tabs"> |
333 | + <li data-role="tabitem" data-page="main">Tab 2</li> |
334 | + </ul> |
335 | + </header> |
336 | + |
337 | + <div data-role="content"> |
338 | + <div data-role="page" id="main" style="display: block;"> |
339 | + <div data-role="grid"> |
340 | + <h1>1 Column</h1> |
341 | + <div data-role="row"> |
342 | + <div data-role="column" data-offset="50"><div class="c">Column 1</div></div> |
343 | + </div> |
344 | + <h1>2 Columns</h1> |
345 | + <div data-role="row"> |
346 | + <div data-role="column"><div class="c">Column 1</div></div> |
347 | + <div data-role="column"><div class="c">Column 2</div></div> |
348 | + </div> |
349 | + <h1>3 Columns</h1> |
350 | + <div data-role="row"> |
351 | + <div data-role="column"><div class="c">Column 1</div></div> |
352 | + <div data-role="column"><div class="c">Column 2</div></div> |
353 | + <div data-role="column"><div class="c">Column 3</div></div> |
354 | + </div> |
355 | + <h1>Individual Sizing</h1> |
356 | + <div data-role="row"> |
357 | + <div data-role="column" data-size="20"><div class="c">Column 1 data-size="20"</div></div> |
358 | + <div data-role="column"><div class="c">Column 2</div></div> |
359 | + <div data-role="column"><div class="c">Column 3</div></div> |
360 | + </div> |
361 | + <div data-role="row"> |
362 | + <div data-role="column"><div class="c">Column 1</div></div> |
363 | + <div data-role="column" data-size="33"><div class="c">Column 2 data-size="33"</div></div> |
364 | + </div> |
365 | + |
366 | + <div data-role="row"> |
367 | + <div data-role="column" data-size="50"><div class="c">Column 1 data-size="25"</div></div> |
368 | + <div data-role="column"><div class="c">Column 2</div></div> |
369 | + <div data-role="column" data-size="66"><div class="c">Column 3 data-size="33"</div></div> |
370 | + </div> |
371 | + |
372 | + <h1>Top-aligned Grid Cells</h1> |
373 | + <div data-role="row" data-align="top"> |
374 | + <div data-role="column"><div class="c">This cell should be top-aligned.</div></div> |
375 | + <div data-role="column"><div class="c">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div></div> |
376 | + <div data-role="column"><div class="c">This cell should be top-aligned.</div></div> |
377 | + </div> |
378 | + |
379 | + <h1>Bottom-aligned Grid Cells</h1> |
380 | + <div data-role="row" data-align="bottom"> |
381 | + <div data-role="column"><div class="c">This cell should be bottom-aligned.</div></div> |
382 | + <div data-role="column"><div class="c">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div></div> |
383 | + <div data-role="column"><div class="c">This cell should be bottom-aligned.</div></div> |
384 | + </div> |
385 | + |
386 | + <h1>Vertically-aligned Grid Cells</h1> |
387 | + <div data-role="row" data-align="center"> |
388 | + <div data-role="column"><div class="c">This cell should be vertically-aligned.</div></div> |
389 | + <div data-role="column"><div class="c">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div></div> |
390 | + <div data-role="column"><div class="c">This cell should be vertically-aligned.</div></div> |
391 | + </div> |
392 | + |
393 | + <h1>Mixed-aligned Grid Cells</h1> |
394 | + <div data-role="row"> |
395 | + <div data-role="column" data-align="top"><div class="c">This cell should be top-aligned.</div></div> |
396 | + <div data-role="column" data-align="center"><div class="c">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div></div> |
397 | + <div data-role="column" data-align="bottom"><div class="c">This cell should be bottom-aligned.</div></div> |
398 | + </div> |
399 | + |
400 | + </div> |
401 | + </div> |
402 | + </div> |
403 | + </div> |
404 | +</body> |
405 | +</html> |
Is it still relevant?