Completed documentation for grid

This commit is contained in:
Angelos Chalaris 2017-11-16 20:45:44 +02:00
parent 5cf239b8d4
commit c42e293d00
2 changed files with 142 additions and 24 deletions

View file

@ -42,7 +42,18 @@ module.exports = {
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span><span class="highlight-a">&lt;/div&gt;</span> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>
`],
`,
`<p>You can use the grid system to create a responsive <a href="https://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/" target="_blank">media object</a> in one of many ways. Below is a simple example of a two-column media object with an image and some text:
<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-2&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;img</span> <span class="highlight-b">src</span>=<span class="highlight-c">&quot;image.png&quot;</span> <span class="highlight-b">alt</span>=<span class="highlight-c">&quot;Image description&quot;</span><span class="highlight-a">/&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;h2&gt;</span>Media object heading<span class="highlight-a">&lt;/h2&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;p&gt;</span>Media object content...<span class="highlight-a">&lt;/p&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
],
notes: [
`<strong>mini.css</strong> uses a mobile-first approach in its grid system, so you do not have to rewrite the same layout for all three screen sizes. Leaving a column's size, offset or order unspecified for a screen size will use the style applied for the previous largest screen size recursively. This also applies to predefined layouts.`,
`The specific breakpoints for small, medium and large screen sizes are as follows:
@ -51,9 +62,10 @@ module.exports = {
<li>medium: more than or equal to <code>768px</code> wide and less than <code>1280px</code> wide</li>
<li>large: <code>1280px</code> wide or more</li>
</ul>`,
`You can use fluid columns to create columns whose wide is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).`,
`Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.`,
`You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.`
`In many cases, you can omit the container and just use rows and columns. You only need to make sure that all of your rows have the same parent element.`,
`You can use fluid columns to create columns whose width is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).`,
`Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.`,
`You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.`
],
customization: [
`Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable. This only affects the padding of the container.`
@ -151,21 +163,83 @@ module.exports = {
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`]
}
],
dos: [],
donts: []
dos: [
{
description: `A column can contain a container or a row inside it, or even be a row at the same time. In the latter case, it will act as a column for its parent row and as a row for its children.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-3&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;container&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-3&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-3 row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt; &lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
},
{
description: `You can mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns whose total width exceeds <code>12</code> (100%). The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;&lt;/div&gt; &lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-4&quot;</span><span class="highlight-a">&gt;</span><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
},
{
description: `You can change the layout of your content for different displays, laying out your content vertically on smaller screens or horizontally on larger screens. If your columns exceed a total width of <code>12</code> (100%) on some displays, they will wrap accordingly.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
},
{
description: `You do not need to specify a column's width or reapply offset and reordering modifiers if they are the same as the previous screen size.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm col-lg-3 col-md-last&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-6 col-md-offset-2&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
},
{
description: `You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-sm-12 cols-md-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div&gt;&lt;/div&gt;</span> <span class="highlight-a">&lt;div&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
},
{
description: `To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can set its offset to <code>0</code> for a specific screen size. Similarly, to remove previously applied reordering modifiers from a column, you can set its order to <code>normal</code>.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-8 col-sm-offset-1 col-md-offset-0&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-last col-md-normal&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
}
],
donts: [
{
description: `Avoid placing a column directly inside another column. Always use a row to wrap columns, instead.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
},
{
description: `Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid layout.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;container&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;p&gt;</span>Do not do this.<span class="highlight-a">&lt;/p&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;p&gt;</span>Do not do this.<span class="highlight-a">&lt;/p&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
},
{
description: `Never omit the class that specifies a column's width for the small screen size. You can omit all other classes and modifiers, except for this. This also applies to predefined layouts.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-md&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-md&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span></pre>`
},
{
description: `Avoid combining normal column width modifiers with predefined layouts, as the predefined layout will most likely override the width modifier of the column.`,
sample: `<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-sm-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-sm-4&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>`
}
]
}
/*
Modifiers:
{
title : '',
description: '',
example: '',
samples: []
}
Dos/Donts:
{
description: '',
sample: ''
}
*/

View file

@ -173,7 +173,16 @@
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span><span class="highlight-a">&lt;/div&gt;</span> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre>
</div>
<p>You can use the grid system to create a responsive <a href="https://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/" target="_blank">media object</a> in one of many ways. Below is a simple example of a two-column media object with an image and some text:
<pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-2&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;img</span> <span class="highlight-b">src</span>=<span class="highlight-c">&quot;image.png&quot;</span> <span class="highlight-b">alt</span>=<span class="highlight-c">&quot;Image description&quot;</span><span class="highlight-a">/&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;h2&gt;</span>Media object heading<span class="highlight-a">&lt;/h2&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;p&gt;</span>Media object content...<span class="highlight-a">&lt;/p&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div>
<div class="section double-padded"><h3>Modifiers</h3>
<h4>Screen sizes and width</h4><p>Each column class is defined by specifying a screen size (small - <code>sm</code>, medium - <code>md</code> or large - <code>lg</code>) and a column width (a value between <code>1</code> and <code>12</code> or you can omit it for a fluid column), separated by dashes (e.g. <code>.col-sm-6</code> for a 6-wide column on a small screen). Using these you can apply different layouts for different screen sizes, by altering the width of columns, using multiple classes. Note that column widths are applied recursively, meaning that if you do not specify a width for a specific screen size the column will use the width applied for the previous largest screen size.</p><h5>Example</h5><div class="container" style="padding: 0.25rem">
<div class="row">
@ -243,13 +252,48 @@
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm col-sm-first col-md-last&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm col-md-first col-lg-normal&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div>
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-3&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;container&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-3&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-3 row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt; &lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark>&nbsp;A column can contain a container or a row inside it, or even be a row at the same time. In the latter case, it will act as a column for its parent row and as a row for its children.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;&lt;/div&gt; &lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-4&quot;</span><span class="highlight-a">&gt;</span><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark>&nbsp;You can mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns whose total width exceeds <code>12</code> (100%). The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark>&nbsp;You can change the layout of your content for different displays, laying out your content vertically on smaller screens or horizontally on larger screens. If your columns exceed a total width of <code>12</code> (100%) on some displays, they will wrap accordingly.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm col-lg-3 col-md-last&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-6 col-md-offset-2&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark>&nbsp;You do not need to specify a column's width or reapply offset and reordering modifiers if they are the same as the previous screen size.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-sm-12 cols-md-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div&gt;&lt;/div&gt;</span> <span class="highlight-a">&lt;div&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark>&nbsp;You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-8 col-sm-offset-1 col-md-offset-0&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-last col-md-normal&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark>&nbsp;To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can set its offset to <code>0</code> for a specific screen size. Similarly, to remove previously applied reordering modifiers from a column, you can set its order to <code>normal</code>.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark>&nbsp;Avoid placing a column directly inside another column. Always use a row to wrap columns, instead.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;container&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;p&gt;</span>Do not do this.<span class="highlight-a">&lt;/p&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;p&gt;</span>Do not do this.<span class="highlight-a">&lt;/p&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark>&nbsp;Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid layout.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-md&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-md&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark>&nbsp;Never omit the class that specifies a column's width for the small screen size. You can omit all other classes and modifiers, except for this. This also applies to predefined layouts.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-sm-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row cols-sm-4&quot;</span><span class="highlight-a">&gt;&lt;/div&gt;</span></span>
<span class="code-line"><span class="highlight-a">&lt;/div&gt;</span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark>&nbsp;Avoid combining normal column width modifiers with predefined layouts, as the predefined layout will most likely override the width modifier of the column.</p></div></div></div>
<div class="section double-padded"><h3>Notes</h3><ul><li><strong>mini.css</strong> uses a mobile-first approach in its grid system, so you do not have to rewrite the same layout for all three screen sizes. Leaving a column's size, offset or order unspecified for a screen size will use the style applied for the previous largest screen size recursively. This also applies to predefined layouts.</li><li>The specific breakpoints for small, medium and large screen sizes are as follows:
<ul>
<li>small: less than <code>768px</code> wide</li>
<li>medium: more than or equal to <code>768px</code> wide and less than <code>1280px</code> wide</li>
<li>large: <code>1280px</code> wide or more</li>
</ul></li><li>You can use fluid columns to create columns whose wide is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).</li><li>Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.</li><li>You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.</li></ul></div>
</ul></li><li>In many cases, you can omit the container and just use rows and columns. You only need to make sure that all of your rows have the same parent element.</li><li>You can use fluid columns to create columns whose width is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).</li><li>Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.</li><li>You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.</li></ul></div>
<div class="section double-padded"><h3>Customization</h3><ul><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable. This only affects the padding of the container.</li></ul></div>
</div><br/><div id="cards" class="card fluid">
<h2 class="section double-padded">Cards</h2>