OLD | NEW |
(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"> </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"> </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 <div class="desktop"> |
| 112 <h4>Desktop</h4> |
| 113 <div class="row"> |
| 114 <div class="one-half column"><div class="example">.one-half .column</div
></div> |
| 115 <div class="one-half column"><div class="example">.one-half .column</div
></div> |
| 116 </div> |
| 117 <div class="row"> |
| 118 <div class="one-third column"><div class="example">.one-third .column</d
iv></div> |
| 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> |
| 122 <div class="row"> |
| 123 <div class="one-fourth column"><div class="example">.one-fourth .column<
/div></div> |
| 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> |
| 128 </div> |
| 129 <div class="tablet"> |
| 130 <h4>Tablet</h4> |
| 131 <div class="row"> |
| 132 <div class="one-half column"><div class="example">.one-half .column</div
></div> |
| 133 <div class="one-half column"><div class="example">.one-half .column</div
></div> |
| 134 </div> |
| 135 <div class="row"> |
| 136 <div class="one-third column"><div class="example">.one-third .column</d
iv></div> |
| 137 <div class="one-third column"><div class="example">.one-third .column</d
iv></div> |
| 138 <div class="one-third column"><div class="example">.one-third .column</d
iv></div> |
| 139 </div> |
| 140 <div class="row"> |
| 141 <div class="one-fourth column"><div class="example">.one-fourth .column<
/div></div> |
| 142 <div class="one-fourth column"><div class="example">.one-fourth .column<
/div></div> |
| 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> |
| 146 </div> |
| 147 <div class="mobile"> |
| 148 <h4>Mobile</h4> |
| 149 <div class="row"> |
| 150 <div class="one-half column"><div class="example">.one-half .column</div
></div> |
| 151 <div class="one-half column"><div class="example">.one-half .column</div
></div> |
| 152 </div> |
| 153 <div class="row"> |
| 154 <div class="one-third column"><div class="example">.one-third .column</d
iv></div> |
| 155 <div class="one-third column"><div class="example">.one-third .column</d
iv></div> |
| 156 <div class="one-third column"><div class="example">.one-third .column</d
iv></div> |
| 157 </div> |
| 158 <div class="row"> |
| 159 <div class="one-fourth column"><div class="example">.one-fourth .column<
/div></div> |
| 160 <div class="one-fourth column"><div class="example">.one-fourth .column<
/div></div> |
| 161 <div class="one-fourth column"><div class="example">.one-fourth .column<
/div></div> |
| 162 <div class="one-fourth column"><div class="example">.one-fourth .column<
/div></div> |
| 163 </div> |
| 164 </div> |
| 165 <h3>Direction</h3> |
| 166 <ul> |
| 167 <li>Columns within rows modified by the <code>.reverse</code> class appear
in reverse order</li> |
| 168 <li>Columns within sections modified by the <code>rtl</code> direction app
ear in reverse order respectively</li> |
| 169 </ul> |
| 170 <h4>Reverse Row</h4> |
| 171 <div class="row reverse"> |
| 172 <div class="one-half column"><div class="example">Column 1</div></div> |
| 173 <div class="one-half column"><div class="example">Column 2</div></div> |
| 174 </div> |
| 175 <h4>RTL Row</h4> |
| 176 <div dir="rtl"> |
| 177 <div class="row"> |
| 178 <div class="one-half column"><div class="example">Column 1</div></div> |
| 179 <div class="one-half column"><div class="example">Column 2</div></div> |
| 180 </div> |
| 181 </div> |
| 182 <h4>RTL Reverse Row</h4> |
| 183 <div dir="rtl"> |
| 184 <div class="row reverse"> |
| 185 <div class="one-half column"><div class="example">Column 1</div></div> |
| 186 <div class="one-half column"><div class="example">Column 2</div></div> |
| 187 </div> |
| 188 </div> |
| 189 </main> |
| 190 </body> |
| 191 </html> |
OLD | NEW |