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

Unified 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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scss/_grid.scss » ('j') | scss/_grid.scss » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: html/grid.html
===================================================================
new file mode 100644
--- /dev/null
+++ b/html/grid.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!--
+ This file is part of universal-design-language
+ Copyright (C) 2016 Eyeo GmbH
+
+ universal-design-language is free software: you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ universal-design-language is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with web.starter-kit. If not, see <http://www.gnu.org/licenses/>.
+-->
+<html dir="ltr">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <title>Grid</title>
+ <link rel="stylesheet" href="/css/main.css">
+ <style>
+
+ /* NOTE: The following inline styles are meant for this demo **only**. */
+
+ body
+ {
+ margin-bottom: 3em;
+ }
+
+ header
+ {
+ border-bottom: 2px solid gray;
+ }
+
+ .desktop
+ {
+ max-width: 992px;
+ }
+
+ .tablet
+ {
+ max-width: 768px;
+ }
+
+ .mobile
+ {
+ max-width: 576px;
+ }
+
+ @media(min-width: 576px)
+ {
+ .tablet .one-fourth
+ {
+ width: 50%;
+ }
+ }
+
+ .mobile .column
+ {
+ width: 100%;
+ }
+
+ .example
+ {
+ background-color: lightgray;
+ padding: 8px 16px;
+ margin-top: 16px;
+ margin-bottom: 16px;
+ border: 1px solid white;
+ }
+
+ </style>
+</head>
+<body>
+
+ <div class="container">
+ <h1>Grid</h1>
+ </div>
+
+ <section class="container">
+ <header>
+ <h3>Sizes</h3>
+ </header>
+ <p class="mobile example"><code>$mobile-breakpoint</code> - 576px</p>
+ <p class="tablet example"><code>$tablet-breakpoint</code> - 768px</p>
+ <p class="desktop example"><code>$desktop-breakpoint</code> - 992px</p>
+ </section>
+
+ <section>
+ <header class="container">
+ <h3>Containers</h3>
+ </header>
+ <p class="container example"><code>.container</code> - device <a href="#sizes">size</a>.</p>
+ <p class="container-fluid example"><code>.container-fluid</code> - 100%</p>
+ </section>
+
+ <div class="container">
+
+ <section>
+
+ <h3>Columns</h3>
+ <p>Columns must be contained within one or more <code>.row</code>.</p>
+
+ <section>
+ <header>
+ <h4>Desktop</h4>
+ </header>
+ <p>Up to four columns are supported on desktop.</p>
+
+ <section>
+ <h5>Halfs</h5>
+ <div class="row">
+ <div class="one-half column example"><code>.one-half .column</code></div>
+ <div class="one-half column example"><code>.one-half .column</code></div>
+ </div>
+ </section>
+
+ <section>
+ <h5>Thirds</h5>
+ <div class="row">
+ <div class="one-third column example"><code>.one-third .column</code></div>
+ <div class="two-thirds column example"><code>.two-thirds .column</code></div>
+ </div>
+ </section>
+
+ <section>
+ <h5>Fourths</h5>
+ <div class="row">
+ <div class="one-fourth column example"><code>.one-fourth .column</code></div>
+ <div class="three-fourths column example"><code>.three-fourths .column</code></div>
+ </div>
+ </section>
+ </section>
+
+ <section>
+ <header>
+ <h4>Tablet</h4>
+ </header>
+ <p>Fourth columns collapse into half columns on tablets. All other columns (including .one-half) collapse into one.</p>
+ <div class="row tablet">
+ <div class="one-fourth column example"><code>.one-fourth .column</code></div>
+ <div class="one-fourth column example"><code>.one-fourth .column</code></div>
+ <div class="one-fourth column example"><code>.one-fourth .column</code></div>
+ <div class="one-fourth column example"><code>.one-fourth .column</code></div>
+ </div>
+ </section>
+
+ <section>
+ <header>
+ <h4>Mobile</h4>
+ </header>
+ <p>All columns collapse into one on mobile.</p>
+ <div class="row mobile">
+ <div class="one-fourth column example"><code>.one-fourth .column</code></div>
+ <div class="one-third column example"><code>.one-third .column</code></div>
+ <div class="one-half column example"><code>.one-half .column</code></div>
+ </div>
+ </section>
+ </section>
+
+ <section>
+ <header>
+ <h3>Direction</h3>
+ </header>
+ <p>Columns flow according to parent direction.</p>
+
+ <section dir="ltr">
+ <h4>Left to right</h4>
+ <div class="row">
+ <div class="one-half column example">Column 1</div>
+ <div class="one-half column example">Column 2</div>
+ </div>
+ </section>
+
+ <section dir="rtl">
+ <h4>Right to left</h4>
+ <div class="row">
+ <div class="one-half column example">Column 1</div>
+ <div class="one-half column example">Column 2</div>
+ </div>
+ </section>
+ </section>
+
+ <section>
+ <header>
+ <h3>Pushing & pulling</h3>
+ </header>
+ <p>Use <code>.push-*-*</code> and <code>.pull-*-*</code> to push (forward) or pull (backward) a column.</p>
+ <p>This is useful for controling the order in which columns appear when they are collapsed.</p>
+ <div class="row">
+ <div class="one-half push-one-half column example"><code>.one-half .push-one-half column</code></div>
+ <div class="one-half pull-one-half column example"><code>.one-half .pull-one-half column</code></div>
+ </div>
+ </section>
+
+ </div>
+</body>
+</html>
« no previous file with comments | « no previous file | scss/_grid.scss » ('j') | scss/_grid.scss » ('J')

Powered by Google App Engine
This is Rietveld