Skip to content

Instantly share code, notes, and snippets.

@Chalarangelo
Created November 6, 2017 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chalarangelo/3bd745d6beb86358d96379388ae80862 to your computer and use it in GitHub Desktop.
Save Chalarangelo/3bd745d6beb86358d96379388ae80862 to your computer and use it in GitHub Desktop.
minicss-v2-doc-dump
{'code': '<div class="row">\r\n'
' <div class="card">\r\n'
' <div class="section">\r\n'
' <h3>Card Title</h3>\r\n'
' <p>Card content...</p>\r\n'
' </div>\r\n'
' </div>\r\n'
' <div class="card">\r\n'
' <div class="section">\r\n'
' <h3>Card Title</h3>\r\n'
' <p>Card content...</p>\r\n'
' </div>\r\n'
' </div>\r\n'
'</div>',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">To start using cards in your layout, you need to be somewhat familiar with the <a href="grid"><strong>grid</strong></a> module, so if you aren't, take a minute to read how its basic layout works. The basic syntax for cards is composed of three components, presented below in the order they should be added to the DOM tree:</p>
<ol style="text-align: justify;">
<li>At the outermost level of the card layout syntax is a <code>.row</code>, which serves as a wrapper for all the cards inside it.</li>
<li>Inside the <code>.row</code>, cards are defined as <code>&lt;div&gt;</code> elements of the <code>.card</code> class.</li>
<li>Finally, inside the <code>.card</code>s, you can define sections using the <code>.section</code> class to wrap your content.</li>
</ol>
<p style="text-align: justify;">Note that cards will respond to screen changes, realigning themselves as necessary to fit on the page.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="card"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;h3&gt;Card Title&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;p&gt;Content not in a section!&lt;/p&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using cards with content '
'inside them that is not wrapped in sections. Try to use a single '
'<code>.section</code> to wrap the content inside these to avoid '
'unexpected behavior.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="card"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'&lt;div class="row"&gt;\r\n'
' &lt;div class="card"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0If you want to place multiple '
'cards side by side, add them all inside the same '
'<code>.row</code>. Placing cards inside different rows or not '
'inside rows at all can result in unexpected behavior. </p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="card row"&gt;\r\n'
'&lt;/div&gt;\r\n'
'<span class="fore-secondary">&lt;!-- or --&gt;</span>\r\n'
'&lt;div class="card col-sm"&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0You should not have elements '
'that are both cards and rows or columns at the same time.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6 col-lg-4">\n'
'<pre>&lt;div class="card"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;h3&gt;Card Title&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Card content...&lt;/p&gt;\r\n'
' &lt;p&gt;More card content...&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can add as many '
'<code>.section</code>s as you like to a card.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-lg-4">\n'
'<pre>&lt;div class="card"&gt;\r\n'
' &lt;h3 class="section"&gt;Card Title&lt;/h3&gt;\r\n'
' &lt;p class="section"&gt;Card content...&lt;/p&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can use the <code>.section</code> '
'class for things other than <code>&lt;div&gt;</code> elements (e.g. '
'<code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code>, '
'<code>&lt;p&gt;</code>, <code>&lt;button&gt;</code>).</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-lg-4">\n'
'<pre>&lt;div class="card"&gt;\r\n'
' &lt;div class="section row"&gt;\r\n'
' &lt;div class="card"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;div class="card"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="card"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can place <code>.row</code> '
'elements inside <code>.card</code> elements, if you want. you should '
'normally also make those rows into card <code>.section</code>s, but '
'for this specific case you might want to make an exception '
'sometimes.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container">
<br/>
<div class="row">
<div class="card"><div class="section"><h3>Card 1</h3><p>This is a basic card with some sample content.</p></div></div>
<div class="card"><div class="section"><h3>Card 2</h3><p>This is another card with some sample content.</p></div></div>
<div class="card"><div class="section"><h3>Card 3</h3><p>This is one more card with some sample content.</p></div></div>
</div>
<br/>
</div>
</div>,
'id': 'basic-syntax',
'module': 'card',
'name': ' Basic syntax',
'notes': ['<li>The <strong>card</strong> module is compatible with modern '
'browsers, but might not display properly in older browsers.</li>',
'<li>If you want to further customize your <code>.section</code>s, '
'check the section below.</li>']}
{'code': '&lt;div class="card warning"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Warning&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'\r\n'
'&lt;div class="card error"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Error&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">Cards can also be used to display important information or error messages to users. You can use the <code>.warning</code> class to display a yellow warning card or, if you need to display an error message to your users, you can use the <code>.error</code> class to display a red error card. </p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12"><pre>&lt;div class="card warning '
'errors"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Bad card&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid combining two card color '
'variants, as this might cause some unexpected behavior.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br/>
<div class="row">
<div class="card warning"><div class="section"><h3>Warning Card</h3><p>Warning cards are used to display important information to users.</p></div></div>
<div class="card error"><div class="section"><h3>Error Card</h3><p>Error cards are used to display error messages to users.</p></div></div>
</div>
<br/>
</div>
</div>,
'id': 'color-variants',
'module': 'card',
'name': 'Card color variants',
'notes': ['<li>If you want more color variants for your cards, check out the '
'<a href="customization">customization</a> page.</li>']}
{'code': '&lt;div class="card"&gt;\r\n'
' &lt;img src="..." class="section media"&gt;\r\n'
' &lt;div class="section '
'double-padded"&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;\r\n'
' &lt;div class="section '
'dark"&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;\r\n'
' &lt;div class="section '
'darker"&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">You can do a lot more with card sections apart from filling them with textual content. First off, you can add media sections to your cards, applying the styles of <code>.section</code> and <code>.media</code> to an <code>&lt;img&gt;</code> element or a video element of your choice (e.g. using a <code>&lt;iframe&gt;</code> element in the same manner). If you want a section to have more space around it, use the <code>.double-padded</code> class. There are also two section color variations: <code>.dark</code> and <code>.darker</code>.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br/>
<div class="row">
<div class="card"><div class="section"><h3>Card with image</h3></div><img alt="image" class="section media" src="https://placehold.it/800x600"/><div class="section"><p>Content</p></div></div>
<div class="card"><iframe class="section media" height="720" src="https://www.youtube.com/embed/ScMzIvxBSi4" width="1280"></iframe><div class="section"><h3>Card with video</h3></div></div>
<div class="card"><div class="section"><h3>Normal section</h3></div><div class="section double-padded"><h3>Double-padded section</h3></div></div>
<div class="card"><div class="section"><h3>Normal section</h3></div><div class="section dark"><h3>Dark section</h3></div><div class="section darker"><h3>Darker section</h3></div></div>
</div><br/>
</div>
</div>,
'id': 'sections-media',
'module': 'card',
'name': 'Sections & media',
'notes': ['<li>The <code>.media</code> class might not be well supported in '
'older browsers, especially legacy versions of Internet '
'Explorer.</li>',
'<li>Due to the <code>.media</code> class using <a '
'href="https://caniuse.com/#feat=object-fit"><code>object-fit</code></a>, '
'you might want to use a polyfill for better browser support, '
'especially if you are targeting Microsoft browsers. We recommend '
'<a href="https://github.com/bfred-it/object-fit-images">this '
'one</a> for images and <a '
'href="https://github.com/jonathantneal/fitie">this one</a> for '
'videos.</li>',
'<li>Depending on the source website, some embedded videos might '
'not display properly inside a <code>.media</code> section.</li>',
'<li>The <code>.media</code> class has a preset size of '
'<code>height: 200px</code>. If you want to customize this, you '
'should check the <a href="customization">customization page</a> '
'for instructions.</li>']}
{'code': '&lt;div class="card small"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Content&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'\r\n'
'&lt;div class="card large"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Content&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'\r\n'
'&lt;div class="col-sm-12"&gt;\r\n'
' &lt;div class="card fluid"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Content&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">Apart from the normal-sized cards (<code>320px</code> wide), there are also two different fixed-width card styles, which can be applied using the <code>.small</code> and <code>.large</code> classes respectively. Fluid cards are available via the <code>.fluid</code> class, but they require one extra step in the card structure, between the <code>.row</code> and <code>.card</code> step, which is to insert either a <code>.col-<span class="fore-primary">SCR_SZ</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens) or a <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> to specify columns with fixed width, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="card"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Content&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'&lt;div class="card fluid"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Content&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid mixing fixed-width cards '
'with <code>.fluid</code> cards. Mixing the two could result in '
'some unexpected behaviors. You can, however, mix fixed-width cards '
'with fluid columns, which can contain <code>.fluid</code> cards '
'inside them, effectively achieving the desired effect.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="card fluid"&gt;\r\n'
' &lt;div class="section"&gt;\r\n'
' &lt;p&gt;Content&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using '
'<code>.fluid</code> cards without wrapping them in columns. Try to '
'use a single <code>.col-sm</code> to wrap the card inside it, '
'otherwise there might be unexpected behavior.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br/>
<div class="row">
<div class="card small"><div class="section"><h3>Small Card</h3><p>Small cards are <code>240px</code> wide.</p></div></div>
<div class="card large"><div class="section"><h3>Large Card</h3><p>Large cards are <code>480px</code> wide.</p></div></div>
<div class="col-sm-12 col-md-12 col-lg">
<div class="card fluid" style="margin: 2px 10px 20px;"><div class="section"><h3>Fluid Card</h3><p>Fluid cards scale their width based on their container. Always wrap them in a column.</p></div></div>
</div>
</div>
<br/>
</div>
</div>,
'id': 'sizing-fluidity',
'module': 'card',
'name': 'Card sizing & fluidity',
'notes': ['<li><code>.fluid</code> cards might not display properly in older '
'browsers, especially legacy versions of Internet Explorer.</li>',
'<li>Due to the fact that <code>.fluid</code> cards stretch to fill '
'their parent container, they might not fully respect their '
'margins, like the rest of the cards. However, this should not '
'cause any noticable problems with layout, except maybe the odd '
'pixel here and there.</li>']}
{'code': '&lt;label for="modal-toggle"&gt;Show modal&lt;/label&gt;\r\n'
'\r\n'
'&lt;input id="modal-toggle" type="checkbox"/&gt;\r\n'
'&lt;div class="modal"&gt;\r\n'
' &lt;div class="card"&gt;\r\n'
' &lt;label for="modal-toggle" class="close"&gt;&lt;/label&gt;\r\n'
' &lt;h3 class="section"&gt;Modal&lt;/h3&gt;\r\n'
' &lt;p class="section"&gt;This is a modal window!&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align: justify;">Modal dialogs are pretty ease to make. Simply create an <code>&lt;input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"&gt;</code> element, immediately followed by a <code>&lt;div&gt;</code> element with the <code>.modal</code> class. Inside this element, you can add a <code>.card</code> element with your modal dialog's contents. Remember to add a <code>&lt;label&gt;</code> element linked to your modal dialog's <code>&lt;input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"&gt;</code> to let users close the dialog. You can also apply the <code>.close</code> class to a <code>&lt;label&gt;</code> element to display a close icon at the top right of the modal dialog.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;input id="modal-toggle" type="checkbox"/&gt;\r\n'
'&lt;label for="modal-toggle"&gt;Show modal&lt;/label&gt;\r\n'
'&lt;div class="modal"&gt;\r\n'
' &lt;div class="card"&gt;\r\n'
' &lt;label for="modal-toggle" '
'class="close"&gt;&lt;/label&gt;\r\n'
' &lt;h3 class="section"&gt;Bad Modal&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0The syntax and structure of '
"the modal dialog's container is very strict. Try to follow it "
'exactly as described in this section.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;label for="modal-toggle"&gt;Show modal&lt;/label&gt;\r\n'
'&lt;input id="modal-toggle" type="checkbox"/&gt;\r\n'
'&lt;div class="modal" role="dialog" '
'aria-labelledby="dialogTitle"&gt;\r\n'
' &lt;div class="card"&gt;\r\n'
' &lt;label for="modal-toggle" class="close"&gt;&lt;/label&gt;\r\n'
' &lt;h3 class="section" id="dialogTitle"&gt;Bad '
'Modal&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can use the <code><span '
'class="fore-secondary">role</span>=<span class="fore-primary">"<a '
'href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_dialog_role">dialog</a>"</span></code> '
'to add accessibility to your modal dialogs. Remember to properly '
'label it and manage keyboard focus, as required.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div style="text-align:center"><br/>
<label class="button primary large" for="modal-check">Click to display a modal dialog</label><br/><br/>
<input id="modal-check" type="checkbox">
<div class="modal" style="text-align:initial">
<div class="card">
<label class="close" for="modal-check"></label>
<h3 class="section double-padded">Modal</h3>
<div class="section double-padded">
<p>This is a modal window!</p>
<label class="button primary" for="modal-check">Close modal</label>
</div>
</div>
</div>
</input></div>
</div>,
'id': 'modals',
'module': 'contextual',
'name': 'Modals',
'notes': ['<li>You can use any styles you want from the <strong><a '
'href="card">card</a></strong> module to create different dialogs '
'based on context (e.g. alerts, warnings etc.).</li>',
'<li>Remember to add a <code>&lt;label&gt;</code> linked to your '
"modal dialog's <code>&lt;input <span "
'class="fore-secondary">type</span>="<span '
'class="fore-primary">checkbox</span>"&gt;</code> or use Javascript '
'to alter its state, otherwise users will not be able to close the '
'dialog.</li>',
'<li>You can place your modal dialog anywhere on your page, as long '
'as the structure is not altered. You can also toggle it from '
'anywhere on a page.</li>']}
{'code': '&lt;mark&gt;primary&lt;/mark&gt;\r\n'
'&lt;mark class="secondary"&gt;secondary&lt;/mark&gt;\r\n'
'&lt;mark class="tertiary"&gt;tertiary&lt;/mark&gt;\r\n'
'&lt;mark class="inline-block"&gt;long highlight '
'text...&lt;/mark&gt;\r\n'
'&lt;mark class="tag"&gt;tag&lt;/mark&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">To add simple highlights in your text, you can use the <code>&lt;mark&gt;</code> HTML element. These highlights come pre-styled to use the default primary color, but if you would rather use another color for your highlight you can easily add the <code>.secondary</code> or <code>.tertiary</code> class to a <code>&lt;mark&gt;</code> element. For longer pieces of text that need highlighting, consider adding the <code>.inline-block</code> class to make them stand out even more. Finally, you can create contextual tags, using the <code>.tag</code> class.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;mark class="secondary tertiary"&gt;no, no&lt;/mark&gt;\r\n'
'<span class="fore-secondary">&lt;!-- or --&gt;</span>\r\n'
'&lt;mark class="inline-block tag"&gt;oh, no&lt;/mark&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid combining two contextual '
'color classes or a <code>.tag</code> and an '
'<code>.inline-block</code>, as these combinations might result in '
'unexpected behavior.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;mark&gt;some\r\n'
' &lt;mark class="secondary"&gt;text&lt;/mark&gt;\r\n'
'&lt;/mark&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using nested '
'<code>&lt;mark&gt;</code> elements, unless the outer '
'<code>&lt;mark&gt;</code> element is an '
'<code>.inline-block</code>.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;mark class="tag tertiary"&gt;green tag&lt;/mark&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;mark class="inline-block secondary"&gt;red '
'chunk&lt;/mark&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can combine any of the contextual '
'color classes (<code>.secondary</code> or <code>.tertiary</code>) '
'with the <code>.tag</code> or <code>.inline-block</code> class.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;mark class="inline-block"&gt;some\r\n'
' &lt;mark class="secondary"&gt;text&lt;/mark&gt;\r\n'
'&lt;/mark&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can only nest a '
'<code>&lt;mark&gt;</code> inside another if the outer one is of the '
'<code>.inline-block</code> class. You can color the inner '
'<code>&lt;mark&gt;</code> using any of the contextual color classes '
'or even make it a <code>.tag</code>. Be careful, however, to not '
'make the inner <code>&lt;mark&gt;</code> an '
'<code>.inline-block</code> as well.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<p>This is some text with a <mark>highlight</mark>.</p>
<p>Apart from the primary highlight style, there are also <mark class="secondary">secondary</mark> and <mark class="tertiary">tertiary</mark> styles for highlighting.</p><br/>
<p><mark class="inline-block">If you want to highlight a longer piece of text, without line breaks, you can turn the highlight into an inline-block like you see this piece of text being displayed.</mark></p><br/>
<p>Finally, you can create contextual tags like <mark class="tag">this</mark> or <mark class="tag">7</mark>.</p><br/>
</div>
</div>,
'id': 'text-highlighting',
'module': 'contextual',
'name': 'Text highlighting',
'notes': ['<li>Try to use elements with the <code>.inline-block</code> class '
'only when absolutely necessary, as they break the normal text flow '
'of the document. Avoid using this class on shorter pieces of text '
'that span a few words and contain no line breaks.</li>',
'<li><code>&lt;mark&gt;</code> elements, along with their '
'supporting classes (except for <code>.inline-block</code>) can be '
'easily used in paragraphs, headings and other elements, as they '
'scale according to their parent element.</li>']}
{'code': '&lt;span class="toast"&gt;This is a normal toast '
'message!&lt;/span&gt;\r\n'
'&lt;span class="toast small"&gt;This is a large toast '
'message!&lt;/span&gt;\r\n'
'&lt;span class="toast large"&gt;This is a small toast '
'message!&lt;/span&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align:justify">Toasts aim to help bridge the gap between web and native applications on mobile devices, by displaying native-looking toast messages. To create a toast, wrap some text inside a <code>&lt;span&gt;</code> element with the <code>.toast</code> class. Toasts appear at the bottom of the screen on top of everything else. If you want to create smaller or larger toast messasges, you can add the <code>.small</code> or <code>.large</code> classes respectively.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12">\n'
'<pre>&lt;span class="toast small large"&gt;Not a good '
'toast&lt;/span&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid combining two toast size '
'variants, as this might cause unexpected behavior.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div style="height: 15rem;">
<span class="toast demo">I'm a toast message!</span><br>
<span class="toast small demo">I'm a small toast message!</span><br>
<span class="toast large demo">I'm a large toast message!</span>
</br></br></div>
</div>,
'id': 'toasts',
'module': 'contextual',
'name': 'Toasts',
'notes': ['<li>Toast elements do not have any pre-defined behavior. You '
'should use your own Javascript code and interactive HTML elements '
'to deal with showing and hiding them as necessary.</li>',
'<li>If you want to create your own color or size variants for '
'toast messages, check out the <a '
'href="customization">customization</a> page.</li>']}
{'code': '&lt;span class="tooltip" aria-label="This is a tooltip"&gt;Hover '
'over this text to see a tooltip!&lt;/span&gt;\r\n'
'&lt;span class="tooltip bottom" aria-label="This is a '
'tooltip"&gt;Hover over this text to see a reverse '
'tooltip!&lt;/span&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">Tooltips can be used to convey context-sensitive information when the user hovers over some text. To create a tooltip, simply wrap the text you want users to hover over in an element with the <code>.tooltip</code> class (our choice is usually a <code>&lt;span&gt;</code> element, but your needs may differ) and add an <code><span class="fore-secondary">aria-label</span></code> in that element, setting its value to the content of your tooltip. Tooltips display at the top of the hovered text by default, so if you want to show them below the text, add the <code>.bottom</code> class to them.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br><p aria-label="This is a tooltip" class="tooltip">Hover over this text to see a tooltip!</p><br>
<p aria-label="This is a tooltip" class="tooltip bottom">Hover over this text to see a reverse tooltip!</p><br>
</br></br></br></div>
</div>,
'id': 'tooltips',
'module': 'contextual',
'name': 'Tooltips',
'notes': ['<li>Tooltips are built to be accessible and should display '
'properly on screenreaders.</li>',
'<li>If you are not satisfied with the default tooltip colors, '
'please check out the <a href="customization">customization '
'page</a> for instuctions on how to create your own tooltip '
'variants.</li>',
'<li>Remember to always add the <code><span '
'class="fore-secondary">aria-label</span></code> attribute, '
'otherwise your tooltip will not have any text to show.</li>']}
{'code': '&lt;p&gt;This is a paragraph with some &lt;strong&gt;bold '
'text&lt;/strong&gt; and some &lt;em&gt;italics '
'text&lt;/em&gt;.&lt;/p&gt;\r\n'
'&lt;a href="#"&gt;This is a link.&lt;/a&gt;\r\n'
'&lt;small&gt;This is some small text.&lt;/small&gt;\r\n'
'&lt;sub&gt;Subscript&lt;/sub&gt;\r\n'
'&lt;sup&gt;Superscript&lt;/sup&gt;\r\n'
'&lt;code&gt;Inline code&lt;/code&gt;\r\n'
'&lt;kbd&gt;Keyboard Input&lt;/kbd&gt;\r\n'
'&lt;hr&gt;\r\n'
'&lt;pre&gt;This is some preformatted text.&lt;/pre&gt;\r\n'
'&lt;blockquote cite="www.quotation.source"&gt;\r\n'
' This is some quoted text from another website or person.\r\n'
'&lt;/blockquote&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align: justify;">The most common HTML5 elements must be things like <code>&lt;p&gt;</code>aragraphs, bold (<code>&lt;strong&gt;</code>) &amp; italics (<code>&lt;em&gt;</code>) text, links (<code>&lt;a&gt;</code>), horizontal rules (<code>&lt;hr&gt;</code>) and <code>&lt;small&gt;</code> text. These, along with a few others, are styled by default using clean, modern design to make your pages look cool and stand out from the rest of the internet.</p>
<h3>Sample code</h3>
<br/>
</div>,
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><p>This is a paragraph with some sample text. Did you know <strong>mini.css</strong> v2 is codenamed <strong>Fermion</strong>? No? Well, now you do! Oh, by the way, that was some Bold text and here is some <em>text in Italics</em>. Maybe you want to know what our inline elements look like. For example a <a href="https://github.com/Chalarangelo/mini.css">link to the Github repository of mini.css</a> looks like that! Neat, right? Maybe you want to see some <code>inline code</code> or some sample <kbd>input</kbd>. Oh, also <small>small text</small> is cool, along with its siblings: the subscript<sub>hi!</sub> and the superscript<sup>hello!</sup>. Finally, check out the horizontal rule, preformatted code block and quotation below.</p><hr/>
<pre>function sum(num1, num2) {
var num3 = num1 + num2;
console.log('Result: ' + num3);
}</pre>
<blockquote cite="https://www.google.com">This is some quoted text from elsewhere.</blockquote><br/>
</div>
</div>,
'id': 'common-textual-elements',
'module': 'core',
'name': 'Common textual elements',
'notes': []}
{'code': '&lt;h1&gt;Heading '
'1&lt;small&gt;Subheading&lt;/small&gt;&lt;/h1&gt;\r\n'
'&lt;h2&gt;Heading '
'2&lt;small&gt;Subheading&lt;/small&gt;&lt;/h2&gt;\r\n'
'&lt;h3&gt;Heading '
'3&lt;small&gt;Subheading&lt;/small&gt;&lt;/h3&gt;\r\n'
'&lt;h4&gt;Heading '
'4&lt;small&gt;Subheading&lt;/small&gt;&lt;/h4&gt;\r\n'
'&lt;h5&gt;Heading '
'5&lt;small&gt;Subheading&lt;/small&gt;&lt;/h5&gt;\r\n'
'&lt;h6&gt;Heading 6&lt;small&gt;Subheading&lt;/small&gt;&lt;/h6&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align: justify;">All six of the HTML headings (<code>&lt;h1&gt;</code> - <code>&lt;h6&gt;</code>) are styled with simple rules, providing a clean base for your pages' headings. Apart from the headings themselves, complementary rules are provided for <code>&lt;small&gt;</code> elements inside headings, allowing you to define subheadings or explanatory text for those headings. These subheadings are stylized to display below the headings in smaller, lighter type.</p>
<h3>Sample code</h3>
<br/>
</div>,
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal row">
<div class="col-sm-12 col-lg-6 col-lg-first"><h1>Heading 1<small>Subheading</small></h1></div>
<div class="col-sm-12 col-lg-6"><h2>Heading 2<small>Subheading</small></h2></div>
<div class="col-sm-12 col-lg-6 col-lg-last"><h3>Heading 3<small>Subheading</small></h3></div>
<div class="col-sm-12 col-lg-6 col-lg-first"><h4>Heading 4<small>Subheading</small></h4></div>
<div class="col-sm-12 col-lg-6"><h5>Heading 5<small>Subheading</small></h5></div>
<div class="col-sm-12 col-lg-6 col-lg-last"><h6>Heading 6<small>Subheading</small></h6></div>
</div>,
'id': 'headings',
'module': 'core',
'name': 'Headings',
'notes': []}
{'code': '&lt;figure&gt;\r\n'
' &lt;img src="..."&gt;\r\n'
' &lt;figcaption&gt;Image caption&lt;/figcaption&gt;\r\n'
'&lt;/figure&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align: justify;">Image elements (<code>&lt;img&gt;</code>) are responsive by default, without the need for any special classes or anything else. We made sure they will scale down as necessary to display properly on smaller devices, while keeping their original aspect ratio, but they will never scale up above their original size.</p> <p>On a side note, if you want to add captions to images, you can use a <code>&lt;figcaption&gt;</code> element, while wrapping both the image and it inside a <code>&lt;figure&gt;</code>.</p>
<h3>Sample code</h3>
<br/>
</div>,
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><figure><img alt="image" src="https://placehold.it/800x600"/><figcaption>Image caption</figcaption></figure></div>
</div>,
'id': 'images-captions',
'module': 'core',
'name': 'Image responsiveness & captions',
'notes': []}
{'code': '&lt;ul&gt;\r\n'
' &lt;li&gt;Apple&lt;/li&gt;\r\n'
' &lt;li&gt;Orange&lt;/li&gt;\r\n'
' &lt;li&gt;Strawberry&lt;/li&gt;\r\n'
'&lt;/ul&gt;\r\n'
'\r\n'
'&lt;ol&gt;\r\n'
' &lt;li&gt;Wake up&lt;/li&gt;\r\n'
' &lt;li&gt;Eat breakfast&lt;/li&gt;\r\n'
' &lt;li&gt;Go to work&lt;/li&gt;\r\n'
'&lt;/ol&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align: justify;">Lists are also very commonly used in websites and apps. We tweaked a few margins and paddings to save some space and make them align properly with the rest of the common HTML elements that we use, but both unordered lists (<code>&lt;ul&gt;</code>) and ordered lists (<code>&lt;ol&gt;</code>) are minimally pre-styled to make things a little bit easier for you.</p>
<h3>Sample code</h3>
<br/>
</div>,
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br/>
<ul>
<li>Apple</li>
<li>Orange</li>
<li>Strawberry</li>
</ul><br/>
<ol>
<li>Wake up</li>
<li>Eat breakfast</li>
<li>Go to work</li>
</ol><br/>
</div>
</div>,
'id': 'lists',
'module': 'core',
'name': 'Lists',
'notes': []}
{'code': '',
'desc': <div class="col-sm-12">
<p style="text-align: justify;">For the basic typography rules we did the following, along with other things presented below:</p>
<ul>
<li>We use a <a href="https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/">native font stack</a> to figure out the best font for your device.</li>
<li>We set the colors to <code>background: #f8f8f8;</code> and <code>color: #212121;</code>.</li>
<li>We use a <code>font-size</code> of <code>16px</code> for the root element.</li>
<li>We set <code>line-height</code> to <code>1.5</code>.</li>
</ul>
</div>,
'donts': [],
'dos': [],
'example': '',
'id': 'typography',
'module': 'core',
'name': 'Typography',
'notes': ['<li>Fluid typography is also included, but not enabled by default. '
'If you want to try it out, check out the out the <a '
'href="customization">customization</a> page.</li>']}
{'code': '&lt;div class="container"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-1"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-11"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-2"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-10"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-3"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-9"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-4"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-8"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-5"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-7"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12">
<p style="text-align: justify;">The grid system's basic layout is composed of three components, presented below in the order they should be added to the DOM tree:</p>
<ol style="text-align: justify;">
<li>The grid's <code>.container</code> is the outermost layer of your grid system. It is a fluid container that wraps the flexible grid system inside it.</li>
<li>Inside the container, <code>.row</code>s are added to specify each row of the grid layout. Rows serve to provide you with a simple basis for your layout's columns.</li>
<li>Finally, inside the rows, <code>.col-</code> elements are added for the columns. The columns are a little bit more complex than the container and rows, as they are what makes the layout respond to changes. There are two basic ways to define a column for your layout:
<ul>
<li>using <code>.col-<span class="fore-primary">SCR_SZ</span></code> to specify fluid columns, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens).</li>
<li>using <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> to specify columns with fixed width, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column (<code>1</code> meaning 1/12 of the width of the row and <code>12</code> meaning 100% of the width of the row).</li>
</ul>
</li>
</ol>
<h3>Sample code</h3>
<p style="text-align: justify;">The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. Also, the example presented showcases the grid system's syntax for smaller screens, but you can do the same thing for any screen size.</p><br/>
<div class="container"><div class="row"><div class="tabs stacked">
<input id="grid-base-sample" type="checkbox"/>
<label for="grid-base-sample">Show sample code</label>
<div>
</div>
</div></div></div><br/>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="col-sm"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using columns inside '
'columns without a row wrapping them. Either make the outer column '
'a row in itself or wrap the inside columns in a row.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;p&gt;Content without columns...&lt;/p&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using rows with content '
'inside that is not wrapped in columns. Try to use a single '
'<code>.col-sm</code> to wrap the content inside these, otherwise '
'there might be unexpected behavior.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="container"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;p&gt;Normal paragraph.&lt;/p&gt;\r\n'
'&lt;/div&gt;\r\n'
'<span class="fore-secondary">&lt;!-- or --&gt;</span>\r\n'
'&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;p&gt;Normal paragraph.&lt;/p&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid mixing rows and columns '
'with normal content that is not wrapped on the respective level of '
'the grid system. Always wrap content inside the proper containers '
'(container, row or column) in your grid layout.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6 col-lg-4">\n'
'<pre>&lt;div class="col-sm"&gt;\r\n'
' &lt;div class="container"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;div class="col-sm"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0A column can contain a container or a '
'row inside it. The container can also be skipped if inside a column, '
'so you only need to add a row.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-lg-4">\n'
'<pre>&lt;div class="col-sm row"&gt;\r\n'
' &lt;div class="col-sm-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0A column can also be a row at the '
'same time, if you want to include sub-columns inside it. You can '
'make the same element both a column in its own row and a row for its '
'containing columns. The same idea can be applied for the container. '
'Containers can, however, be omitted, when already inside a '
'grid.</p>\n'
'<p></p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-lg-4">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;div class="col-sm-4"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12"&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;div class="col-sm-12"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0Mix 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 with a total size of more than '
'<code>12</code>, meaning with a total width of over 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>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br/>
<div class="row"><div class="col-sm-1"><div class="box-colored">1</div></div><div class="col-sm-11"><div class="box-colored">11</div></div></div>
<div class="row"><div class="col-sm-2"><div class="box-colored">2</div></div><div class="col-sm-10"><div class="box-colored">10</div></div></div>
<div class="row"><div class="col-sm-3"><div class="box-colored">3</div></div><div class="col-sm-9"><div class="box-colored">9</div></div></div>
<div class="row"><div class="col-sm-4"><div class="box-colored">4</div></div><div class="col-sm-8"><div class="box-colored">8</div></div></div>
<div class="row"><div class="col-sm-5"><div class="box-colored">5</div></div><div class="col-sm-7"><div class="box-colored">7</div></div></div>
<div class="row"><div class="col-sm-6"><div class="box-colored">6</div></div><div class="col-sm-6"><div class="box-colored">6</div></div></div>
<div class="row"><div class="col-sm-12"><div class="box-colored">12</div></div></div>
<div class="row"><div class="col-sm"><div class="box-colored">fluid</div></div><div class="col-sm"><div class="box-colored">fluid</div></div></div>
</div>
</div>,
'id': 'basic-layout',
'module': 'grid',
'name': 'Basic layout',
'notes': ['<li><strong>mini.css</strong> uses a mobile-first approach in its '
'grid system. This means that specifying a layout for smaller '
'device sizes will apply the same layout on medium-sized and larger '
'screens, so you do not have to rewrite the same layout for all '
'three screen sizes. However, if you want to change the layout on '
'different screen sizes, check the section below.</li>',
'<li>The <strong>grid</strong> module is compatible with modern '
'browsers, but might not display properly in older browsers.</li>',
'<li>The specific breakpoints for small, medium and large screen '
'sizes are as follows:\n'
'<ul>\n'
'<li><strong>small</strong>: less than <code>768px</code> '
'wide</li>\n'
'<li><strong>medium</strong>: more than or equal to '
'<code>768px</code> wide but less than <code>1280px</code> '
'wide</li>\n'
'<li><strong>large</strong>: <code>1280px</code> wide or more</li>\n'
'</ul>\n'
'</li>',
'<li>Fluid columns can be used for sizes that are not of the form '
'<code>100%/12�<span class="fore-tertiary">X</span></code> where '
'<code><span class="fore-tertiary">X</span></code> an integer value '
'between <code>1</code> and <code>12</code>. For example, if you '
'have 7 <code>.col-sm</code> elements in one row, each of the '
'elements will have a width of 1/7th the width of the row.</li>']}
{'code': '&lt;div class="container"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-8 col-sm-offset-2"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-6 col-sm-offset-3"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-4 col-sm-offset-4"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm col-sm-offset-1"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-4 col-sm-offset-1"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-4 col-sm-offset-2"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12">
<p style="text-align: justify;">If you want to move columns to the right, you can use the offset classes on your columns. Offset classes use the <code>.col-<span class="fore-primary">SCR_SZ</span>-offset-<span class="fore-secondary">COL_WD</span></code> syntax, where <code><span class="fore-primary">SCR_SZ</span></code> is one of the available screen size names (<code><span class="fore-tertiary">sm</span></code>, <code><span class="fore-tertiary">md</span></code> or <code><span class="fore-tertiary">lg</span></code>) and <code><span class="fore-secondary">COL_WD</span></code> a number from <code>0</code> to <code>11</code> specifying the width of the column's offset. Offsets can also be used in combination with screen-specific layouts and column sizes, providing you with greater flexibility when spacing out your content.</p>
<h3>Sample code</h3>
<p style="text-align: justify;">The example presented below showcases the grid system's offsetting syntax for smaller screens, but you can do the same thing for any screen size.</p>
<br/>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm col-md-offset-1 col-md-5 col-lg-4"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm col-md-5 col-lg-4 col-lg-offset-2"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can specify offset classes when '
'you need them and omit them otherwise. This means that, if you want '
'to offset a column only on a medium-sized or a larger screen, you '
'can just specify the offset for that specific screen. Specifying an '
'offset for a smaller screen, however, will apply it to medium-sized '
'and larger screens as well, medium-sized screen offsets will apply '
'to larger screens etc. similar to how the layout system works.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm col-md-10 col-offset-1 col-lg '
'col-lg-offset-0"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0To 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 use the <code>.col-<span '
'class="fore-primary">SCR_SZ</span>-offset-0</code> class, replacing '
'<code><span class="fore-primary">SCR_SZ</span></code> with the '
'desired screen size, effectively resetting all offsets.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br/>
<div class="row"><div class="col-sm-8 col-sm-offset-2"><div class="box-colored">size = 8, offset = 2</div></div></div>
<div class="row"><div class="col-sm-6 col-sm-offset-3"><div class="box-colored">size = 6, offset = 3</div></div></div>
<div class="row"><div class="col-sm-4 col-sm-offset-4"><div class="box-colored">size = 4, offset = 4</div></div></div>
<div class="row">
<div class="col-sm-4 col-sm-offset-1"><div class="box-colored">size = 4, offset = 1</div></div>
<div class="col-sm-4 col-sm-offset-2"><div class="box-colored">size = 4, offset = 2</div></div>
</div>
</div>
</div>,
'id': 'column-offset',
'module': 'grid',
'name': 'Column offsets',
'notes': ['<li>Columns with offsets and columns without offsets can be mixed '
'for better results. In fact, we strongly suggest you try '
'that.</li>',
'<li>Remember to specify a basic layout and/or screen specific '
'layouts in addition to the offset classes.</li>']}
{'code': '&lt;div class="container"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm col-md-last col-lg-normal"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-first col-md-normal"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm col-md-first col-lg-normal"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">Additionally, if you want to reorder your columns, you can do that to some extent using the <code>.col-<span class="fore-primary">SCR_SZ</span>-first</code>, <code>.col-<span class="fore-primary">SCR_SZ</span>-last</code> and <code>.col-<span class="fore-primary">SCR_SZ</span>-normal</code> classes to your columns, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code>, <code><span class="fore-tertiary">md</span></code> or <code><span class="fore-tertiary">lg</span></code>). These classes will change the ordering of your columns appropriately to allow you to move content around any way you want (e.g. moving a navigation sidebar from the left of the content on larger displays to the end of the content on smaller displays).</p>
<h3>Sample code</h3>
<br/>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm col-md-last"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm col-md-last"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can use multiple <code>.col-<span '
'class="fore-primary">SCR_SZ</span>-first</code>s and '
'<code>.col-<span class="fore-primary">SCR_SZ</span>-last</code>s, '
'replacing <code><span class="fore-primary">SCR_SZ</span></code> with '
'the desired screen size, in the same row for the same screen size. '
'If you specify more than one column to be first or last, the columns '
'with the same order will be placed at the beggining or end of the '
'row and the order between them will be determined based on their '
'order of appearance in the DOM tree afterwards.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-last col-md-normal"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0To remove a previously applied '
'reorder from a column (i.e. one applied from the layout from a '
'smaller screen size) or to make sure no reordering is active on a '
'column, you can use the <code>.col-<span '
'class="fore-primary">SCR_SZ</span>-normal</code> class, replacing '
'<code><span class="fore-primary">SCR_SZ</span></code> with the '
'desired screen size, effectively resetting all reorders. You do not, '
'however, need to add this class to all other columns or use it when '
'there are no reorders applied.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container">
<div class="row"><div class="col-sm"><br/><br/></div></div>
<div class="row">
<div class="col-sm col-sm"><div class="box-colored red">first</div></div>
<div class="col-sm col-sm"><div class="box-colored">�</div></div>
<div class="col-sm col-sm"><div class="box-colored">�</div></div>
</div><div class="row"><div class="col-sm"><br/><br/></div></div>
<div class="row">
<div class="col-sm col-sm"><div class="box-colored">�</div></div>
<div class="col-sm col-sm"><div class="box-colored red">normal</div></div>
<div class="col-sm col-sm"><div class="box-colored">�</div></div>
</div>
<div class="row"><div class="col-sm"><br/><br/></div></div>
<div class="row">
<div class="col-sm col-sm"><div class="box-colored">�</div></div>
<div class="col-sm col-sm"><div class="box-colored">�</div></div>
<div class="col-sm col-sm"><div class="box-colored red">last</div></div>
</div>
</div>
</div>,
'id': 'column-reorder',
'module': 'grid',
'name': 'Column reordering',
'notes': ['<li>Columns are ordered by default in order of appearance. You '
'should only apply column reordering classes to the columns you '
'want to reorder on the screen-specific layouts you need them.</li>',
'<li>Remember to specify a basic layout and/or screen specific '
'layouts in addition to the column reordering classes.</li>',
'<li>Column reordering is applied from smaller to larger screens, '
'similar to how column layout and offsetting work.</li>']}
{'code': '&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-1"&gt;\r\n'
' &lt;img src="..."&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;h2&gt;Media object heading&lt;/h2&gt;\r\n'
' &lt;p&gt;Media object content...&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12">
<p style="text-align: justify;">Last, but not least, you can use the grid system's classes to create a <a href="https://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/">media object</a> in one of many ways, based on your needs. The simplest way to implement a media object is using two columns, one for the media (i.e. <code>&lt;img&gt;</code>) and one for the textual content next to the media.</p>
<h3>Sample code</h3>
<br/>
</div>,
'donts': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;img src="..." class="col-sm-1"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;h2&gt;Media object heading&lt;/h2&gt;\r\n'
' &lt;p&gt;Media object content...&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Do not apply a column class '
'directly to the media element (e.g.<code>&lt;img&gt;</code>) or '
'the content of the media object, as this can cause problems with '
'certain elements. Wrap your media objects columns in '
'<code>&lt;div&gt;</code> elements and apply the grid classes to '
'them, instead.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-1 col-md-2 col-lg-3"&gt;\r\n'
' &lt;img src="..."&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-11 col-md-10 col-lg-9"&gt;\r\n'
' &lt;h2&gt;Media object heading&lt;/h2&gt;\r\n'
' &lt;p&gt;Media object content...&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can make your media object '
'responsive, by adding screen-specific layout classes to its '
'columns.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-1 col-sm-last"&gt;\r\n'
' &lt;img src="..."&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;h2&gt;Media object heading&lt;/h2&gt;\r\n'
' &lt;p&gt;Media object content...&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can align the media object\'s '
'content to the left of the image (instead of the other way round), '
'using the <code>.col-<span '
'class="fore-primary">SCR_SZ</span>-normal</code> class, replacing '
'<code><span class="fore-primary">SCR_SZ</span></code> with the '
'desired screen size.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-2"&gt;\r\n'
' &lt;img src="..."&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;h2&gt;Parent media object&lt;/h2&gt;\r\n'
' &lt;p&gt;Parent media object content...&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-2"&gt;\r\n'
' &lt;img src="..."&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;h2&gt;Child media object&lt;/h2&gt;\r\n'
' &lt;p&gt;Child media object content...&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0Media objects can be easily nested. '
'You can use <code>.row</code> elements in the content column of the '
'media object to make everything align perfectly.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container">
<div class="row"><div class="col-sm"><br/></div></div>
<div class="row">
<div class="col-sm col-sm-2"><img alt="image" src="https://placehold.it/800x600"/></div>
<div class="col-sm col-sm row">
<div class="col-sm">
<h3>Media object heading</h3>
<p>This is an example implementation of the popular media object pattern, using simple grid rules.</p>
</div>
</div>
</div>
</div>
</div>,
'id': 'media-object',
'module': 'grid',
'name': 'Media object pattern',
'notes': ['<li>The media object is not a different component, but rather a '
'popular pattern that can be implemented using the standard grid '
'system classes.</li>',
'<li>You can use many different elements for your media object. For '
'example, you can make the right side of the media object contain a '
'form or an input field.</li>']}
{'code': '&lt;div class="row cols-sm-6"&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;p&gt;col-sm-6&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;p&gt;col-sm-6&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12">
<p style="text-align: justify;">Some simple grid layout problems can be solved using predefined layouts. To use a predefined layout, simply add a predefined layout class to a <code>.row</code> element. Predefined classes can be written using one of two syntaxes, similar to normal column classes:</p>
<ul style="text-align: justify;">
<li>fluid column layouts can be specified using <code>.cols-<span class="fore-primary">SCR_SZ</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names.</li>
<li>fixed width columns layouts can be specified using <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the columns.</li>
</ul>
<h3>Sample code</h3>
<br/>
</div>,
'donts': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row cols-sm-6"&gt;\r\n'
' &lt;div class="row cols-sm-7"&gt;\r\n'
' &lt;p&gt;col-sm-6&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row cols-sm-5"&gt;\r\n'
' &lt;p&gt;col-sm-6&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using the normal column '
'classes in conjunction with predefined layouts, as they will most '
'likely not apply and can sometimes cause unexpected behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row cols-sm-12 cols-md-6"&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;p&gt;col-sm-12, col-md-6&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;p&gt;col-sm-12, col-md-6&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can add multiple predefined '
'layout classes for different screen sizes, allowing you to build '
'responsive predefined layouts.</p>\n'
'</div>'],
'example': '',
'id': 'predefined-layout',
'module': 'grid',
'name': 'Predefined layouts',
'notes': ['<li>Predefined layouts can be combined with most of the features '
'of the grid system, such as offsets and reordering.</li>',
'<li>If you use a fluid predefined layout, its columns will always '
'be placed in one row.</li>',
'<li>Not specifying a predefined layout for a resolution will use '
'the style applied for the previous largest resolution '
'recursively.</li>']}
{'code': '&lt;div class="container"&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-3 col-lg-2"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-12 col-md-5 col-lg-7"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-12 col-md-4 col-lg-3"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12">
<p style="text-align: justify;">You can specify different layouts for your pages and web apps, using the grid system's columns. To do this add classes to your columns for different screen sizes, using either the fluid column syntax (<code>.col-<span class="fore-primary">SCR_SZ</span></code>) or the fixed width column syntax (<code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code>) or even both.</p>
<h3>Sample code</h3>
<br/>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0If you want to place two '
'columns side by side on some displays, but not on others (e.g. '
'placing them vertically on smaller displays, then next to each '
'other on medium-sized or larger displays), place them in one row, '
'not multiple, otherwise you will not achieve the desired '
'effect.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-md"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-lg"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Never omit the class needed '
'for the smallest screen size you have (<code>.col-sm</code> or '
'<code>.col-sm-<span class="fore-secondary">COL_WD</span></code>), '
"otherwise the column's layout on smaller displays might behave "
'unexpectedly. You can, however, omit layout for the other two '
'screen sizes if you want.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-12 col-md-6"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can radically change the layout '
'of your content for different displays. Laying out your content '
'vertically in <code>.col-sm-12</code>s for small devices and then '
'compacting it to <code>.col-md-6</code>s for medium displays is '
'pretty common. If your columns exceed a total size of '
'<code>12</code> on some displays, they will wrap accordingly, so do '
'not worry.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm col-lg-3"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-6 col-md-8"&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0Specify only the screen-specific '
"column sizes that you need. You can omit the medium-sized screens' "
'size from a column if its layout on smaller screens is fluid or '
'should be the same as in medium-sized displays. Or, if your larger '
'screen layout is the same as your medium-sized screen layout, you '
'can omit the class for the larger screen.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md">
<div class="row"><div class="col-sm"><h4 style="text-align:center">Small screen layout</h4><hr/></div></div>
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
<div class="row"><div class="col-sm-12"><div class="box-colored red" style="height: 45px;"></div></div><div class="col-sm-12"><div class="box-colored green" style="height: 120px;"></div></div><div class="col-sm-12"><div class="box-colored red" style="height: 45px;"></div></div></div>
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
</div>
<div class="col-sm-12 col-md">
<div class="row"><div class="col-sm"><h4 style="text-align:center">Medium/Large screen layout</h4><hr/></div></div>
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
<div class="row"><div class="col-sm-3"><div class="box-colored red" style="height: 282px;"></div></div><div class="col-sm-5"><div class="box-colored green" style="height: 282px;"></div></div><div class="col-sm-4"><div class="box-colored red" style="height: 282px;"></div></div></div>
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
</div>
</div>
</div>
</div>,
'id': 'screen-specific-layout',
'module': 'grid',
'name': 'Screen-specific layouts',
'notes': ["<li>Leaving a column's size unspecified for a resolution will use "
'the style applied for the previous largest resolution '
'recursively.</li>',
'<li>Changing the layout for different screen sizes can sometimes '
'require complex content realignment, offsetting and reordering. '
'For these features, check the sections below.</li>']}
{'code': '&lt;button&gt;Default button&lt;/button&gt;\r\n'
'&lt;input type="button" class="primary" value="Primary '
'button"&gt;\r\n'
'&lt;input type="reset" class="secondary" value="Secondary '
'button"&gt;\r\n'
'&lt;input type="submit" class="tertiary" value="Tertiary '
'button"&gt;\r\n'
'&lt;button class="inverse"&gt;Inverse button&lt;/button&gt;\r\n'
'&lt;button class="small"&gt;Small button&lt;/button&gt;\r\n'
'&lt;button class="large"&gt;Large button&lt;/button&gt;\r\n'
'&lt;button disabled&gt;Disabled button&lt;/button&gt;\r\n'
'&lt;a href="#" class="button"&gt;Link button&lt;/a&gt;\r\n'
'&lt;a href="#" role="button"&gt;Link button&lt;/a&gt;\r\n'
'&lt;label class="button"&gt;Label button&lt;/label&gt;\r\n'
'&lt;label role="button"&gt;Label button&lt;/label&gt;\r\n'
'\r\n'
'&lt;div class="button-group"&gt;\r\n'
' &lt;button&gt;Button&lt;/button&gt;\r\n'
' &lt;button&gt;Button&lt;/button&gt;\r\n'
' &lt;button&gt;Button&lt;/button&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
<p style="text-align: justify;">All button types have been stylized by default, while maintaining accessiblity. Simply add any <code>&lt;button&gt;</code> or an <code>&lt;input&gt;</code> with a button <code><span class="secondary">type</span></code> (i.e. <code><span class="fore-primary">"button"</span></code>, <code><span class="fore-primary">"submit"</span></code> or <code><span class="fore-primary">"reset"</span></code>) and they will be styled accordingly. You can also use the <code>.button</code> class or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> attribute for links, labels and other elements of your choice to make them look like buttons.</p>
<p style="text-align: justify;">Color variants are available in the form of the <code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code> and <code>.inverse</code> classes. Size variants are available as well in the form of <code>.small</code> and <code>.large</code> classes.</p>
<p style="text-align: justify;">Finally, you can create responsive groups of buttons by wrapping them inside a <code>&lt;div&gt;</code> with the <code>.button-group</code> class.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;button class="secondary inverse"&gt;Problematic '
'button&lt;/button&gt;\r\n'
'<span class="fore-secondary">&lt;!-- or --&gt;</span>\r\n'
'&lt;button class="small large"&gt;Problematic '
'button&lt;/button&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid mixing two or more '
'button color or size variants, as these combinations might result '
'in unexpected behavior.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="button-group"&gt;\r\n'
' &lt;button class="large"&gt;Button&lt;/button&gt;\r\n'
' &lt;button&gt;Button&lt;/button&gt;\r\n'
' &lt;button class="small"&gt;Button&lt;/button&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using button size '
'variants inside a <code>.button-group</code>, as this might result '
'in unexpected behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;button class="inverse small"&gt;Small inverse '
'button&lt;/button&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can mix and match button color '
'and size variants to achieve the desired effect.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="button-group"&gt;\r\n'
' &lt;button&gt;Button&lt;/button&gt;\r\n'
' &lt;input type="reset" class="secondary" value="Secondary '
'button"&gt;\r\n'
' &lt;label class="button inverse"&gt;Label button&lt;/label&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can use button color variants '
'inside the same <code>.button-group</code>. You can also use any '
'component styled like a button inside a '
'<code>.button-group</code>.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
<button>Default button</button>
<button class="primary">Primary button</button>
<button class="secondary">Secondary button</button>
<button class="tertiary">Tertiary button</button>
<button class="inverse">Inverse button</button>
<button class="small">Small button</button>
<button class="large">Large button</button>
<button disabled="">Disabled button</button>
<h4>Button group</h4>
<div class="button-group"> <button>Button</button> <button>Button</button> <button>Button</button> </div>
</div>,
'id': 'buttons',
'module': 'input_control',
'name': 'Buttons & button groups',
'notes': ['<li>If you want more color or size variants for your buttons, '
'check out the <a href="customization">customization</a> page.</li>',
'<li>The <code>.button-group</code> component is compatible with '
'modern browsers, but might not display properly in older '
'browsers.</li>',
'<li><code>.button-group</code>s will display as a horizontal '
'container with all their buttons in one row on medium-sized and '
'larger displays, however they will collapse into a column view for '
'smaller displays.</li>']}
{'code': '&lt;div class="input-group"&gt;\r\n'
' &lt;input type="checkbox" id="check1" tabindex="0"&gt;\r\n'
' &lt;label for="check1"&gt;Checkbox&lt;/label&gt;\r\n'
'&lt;/div&gt;\r\n'
'\r\n'
'&lt;div class="input-group"&gt;\r\n'
' &lt;input type="radio" id="rad1" tabindex="0" '
'name="radio-group-1"&gt;\r\n'
' &lt;label for="rad1"&gt;Radio&lt;/label&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
<p style="text-align: justify;">Checkboxes and radio buttons come pre-styled, using the <a href="https://css-tricks.com/the-checkbox-hack/">checkbox hack</a>, while remaining fully accessible. To create a checkbox or radio button, start using a <code>&lt;div&gt;</code> that implements the <code>.input-group</code> class, and then add an <code>&lt;input&gt;</code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">"checkbox"</span></code> or <code><span class="fore-primary">"radio"</span></code>), followed immediately by a <code>&lt;label&gt;</code> linking to it. Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to your <code>&lt;input&gt;</code>, so that it will register properly for screen readers.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;input type="checkbox" id="check1" tabindex="0"&gt;\r\n'
'&lt;label for="check1"&gt;Checkbox&lt;/label&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Always use an '
'<code>.input-group</code> for your checkboxes and radio buttons. '
'Not doing so will cause the checkbox or radio button to not '
'display properly.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="input-group"&gt;\r\n'
' &lt;input type="checkbox" id="check1"\r\n'
' &lt;label for="check1"&gt;Checkbox&lt;/label&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Remember to add <code><span '
'class="fore-secondary">tabindex</span>=<span '
'class="fore-primary">"0"</span></code> to all your checkboxes and '
'radio buttons to make them accessible.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="input-group"&gt;\r\n'
' &lt;label for="check1"&gt;Checkbox&lt;/label&gt;\r\n'
' &lt;input type="checkbox" id="check1" tabindex="0"&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0The structure of checkboxes '
'and radio buttons is very strict, meaning that the '
'<code>&lt;label&gt;</code> should always be after the '
'<code>&lt;input&gt;</code> and never before, otherwise the '
'checkbox or radio button will not display properly.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="input-group"&gt;\r\n'
' &lt;input type="radio" id="rad1" tabindex="0" '
'name="radio-group-1"&gt;\r\n'
' &lt;input type="radio" id="rad2" tabindex="0" '
'name="radio-group-1"&gt;\r\n'
' &lt;label for="rad2"&gt;Value 2&lt;/label&gt;\r\n'
' &lt;label for="rad1"&gt;Value 1&lt;/label&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0When using multiple radio '
'buttons inside an <code>.input-group</code>, remember to use the '
'usual structure of the radio button component for each radio '
'button (i.e. the <code>&lt;input&gt;</code> and '
'<code>&lt;label&gt;</code>). Not doing so will cause the radio '
'buttons to not display properly.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 '
'col-lg-last">\n'
'<pre>&lt;div class="input-group"&gt;\r\n'
' &lt;input type="checkbox" id="check1" tabindex="0"&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Never leave a checkbox or '
'radio button without a <code>&lt;label&gt;</code>. The '
'<code>&lt;label&gt;</code> is essential to properly display the '
'checkbox or radio button.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6 col-lg-4">\n'
'<pre>&lt;div class="input-group"&gt;\r\n'
' &lt;input type="radio" id="rad1" tabindex="0" '
'name="radio-group-1"&gt;\r\n'
' &lt;label for="rad1"&gt;Value 1&lt;/label&gt;\r\n'
' &lt;input type="radio" id="rad2" tabindex="0" '
'name="radio-group-1"&gt;\r\n'
' &lt;label for="rad2"&gt;Value 2&lt;/label&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can add multiple '
'<code>radio</code> buttons inside one <code>.input-group</code>, as '
'long as they follow the syntax shown above. In fact, we strongly '
'recommend grouping controls that are relevant to each other in this '
'manner.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
<div class="box-centered">
<br/>
<div class="input-group">
<input id="chk1" tabindex="0" type="checkbox"/> <label for="chk1">�Checkbox</label>
</div>
<br/><br/>
<div class="input-group">
<input checked="" id="r1" name="radios" tabindex="0" type="radio" value="r1"/> <label for="r1">�Value 1</label>��<br/>
<input id="r2" name="radios" tabindex="0" type="radio" value="r2"/> <label for="r2">�Value 2</label>��<br/>
<input id="r3" name="radios" tabindex="0" type="radio" value="r3"/> <label for="r3">�Value 3</label>��<br/>
</div>
<br/><br/>
</div>
</div>,
'id': 'checkbox-radio',
'module': 'input_control',
'name': 'Checkboxes & radio buttons',
'notes': ['<li>Checkboxes and radio buttons are fully accessible. However, if '
'not provided with a label, they are not visible to users, but only '
'to screen readers.</li>']}
{'code': '&lt;input type="file" id="file-input"&gt;\r\n'
'&lt;label for="file-input" class="button"&gt;Upload '
'file...&lt;/label&gt;',
'desc': <div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
<p style="text-align: justify;">File upload buttons are commonly a sore spot in CSS frameworks. We try to remedy this problem by hiding the <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">"file"</span>&gt;</code>, while maintaining accessibility and using a linked <code>&lt;label&gt;</code> of the <code>.button</code> class to display it in a modern way.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12">\n'
'<pre>&lt;div class="input-group"&gt;\r\n'
' &lt;input type="file" id="file-input"&gt;\r\n'
' &lt;label for="file-input" class="button"&gt;Upload '
'file...&lt;/label&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can use an '
'<code>.input-group</code> to wrap the file upload '
'<code>&lt;input&gt;</code> and its linked '
'<code>&lt;label&gt;</code>, if you wish.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
<div class="input-group">
<br/>
<input id="file-input-demo" type="file"/>
<label class="button" for="file-input-demo"><i aria-hidden="true" class="fa fa-upload"></i>�Upload file</label>
<br/>
</div>
</div>,
'id': 'file-upload',
'module': 'input_control',
'name': 'File upload buttons',
'notes': ['<li>The icon displayed in the example above is not part of the '
'button styling.</li>',
'<li>File upload buttons do not change their text to the name of '
'the file after the user has selected a file to upload. You can, '
'however, add this functionality using a few lines of '
'Javascript.</li>',
'<li>File upload buttons cannot be focused (i.e. have a '
'<code>:focus</code> state) using the keyboard and this applies to '
'linked labels, too. You can use Javascript to add this '
'functionality, if you wish.</li>']}
{'code': '&lt;form&gt;\r\n'
' &lt;fieldset&gt;\r\n'
' &lt;legend&gt;Simple form&lt;/legend&gt;\r\n'
' &lt;div class="input-group fluid"&gt;\r\n'
' &lt;label for="username"&gt;Username&lt;/label&gt;\r\n'
' &lt;input type="email" value="" id="username" '
'placeholder="username"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="input-group fluid"&gt;\r\n'
' &lt;label for="pwd"&gt;Password&lt;/label&gt;\r\n'
' &lt;input type="password" value="" id="pwd" '
'placeholder="password"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="input-group vertical"&gt;\r\n'
' &lt;label for="nmbr"&gt;Number&lt;/label&gt;\r\n'
' &lt;input type="number" id="nmbr" value="5"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/fieldset&gt;\r\n'
'&lt;/form&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-normal">
<p style="text-align: justify;">Forms are structured the same way you would structure a normal form in HTML5. Simply create a root <code>&lt;form&gt;</code> element and add your <code>&lt;input&gt;</code> elements inside. Link them to <code>&lt;label&gt;</code> elements for ease of access and you are pretty much set. We highly recommend using the <code>&lt;fieldset&gt;</code> and <code>&lt;legend&gt;</code> elements to annotate your forms as well, but you can skip them if you wish.</p>
<p style="text-align: justify;">Forms are inline by default. Use the <code>.input-group</code> class on a <code>&lt;div&gt;</code> wrapping inside it an <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code> pair to make sure they always display together in one line. You can make your <code>.input-group</code>s respond to viewport changes, by adding the <code>.fluid</code> class to them or you can align them vertically by adding the <code>.vertical</code> class. Finally, if you want to create aligned forms with a preset layout, you can utilize the <a href="grid"><strong>grid</strong></a> module's rows and columns.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;form&gt;\r\n'
' &lt;fieldset&gt;\r\n'
' &lt;legend&gt;Responsive form&lt;/legend&gt;\r\n'
' &lt;div class="row input-group"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-4"&gt;\r\n'
' &lt;label for="username"&gt;username&lt;/label&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-12 col-md"&gt;\r\n'
' &lt;input type="email" value="" id="username" '
'placeholder="username"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/fieldset&gt;\r\n'
'&lt;/form&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using the '
'<code>.input-group</code> class when creating aligned forms. This '
'might cause unexpected behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;form&gt;\r\n'
' &lt;fieldset&gt;\r\n'
' &lt;legend&gt;Responsive form&lt;/legend&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-4"&gt;\r\n'
' &lt;label for="username"&gt;username&lt;/label&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-12 col-md"&gt;\r\n'
' &lt;input type="email" value="" id="username" '
'placeholder="username"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-4"&gt;\r\n'
' &lt;label for="pwd"&gt;password&lt;/label&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-12 col-md-4"&gt;\r\n'
' &lt;input type="password" value="" id="pwd" '
'placeholder="password"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/fieldset&gt;\r\n'
'&lt;/form&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can use <code>.row</code> and '
'<code>.col-<span class="fore-primary">SCR_SZ</span></code> or '
'<code>.col-<span class="fore-primary">SCR_SZ</span>-<span '
'class="fore-secondary">COL_WD</span></code> (replacing <code><span '
'class="fore-primary">SCR_SZ</span></code> with one of the available '
'screen size names (<code><span '
'class="fore-tertiary">sm</span></code> for smaller screens, '
'<code><span class="fore-tertiary">md</span></code> for medium-sized '
'screens or <code><span class="fore-tertiary">lg</span></code> for '
'larger screens and <code><span '
'class="fore-secondary">COL_WD</span></code> with a number from '
'<code>1</code> to <code>12</code> specifying the width of the '
'column) to set specific layouts for your aligned forms. You can also '
'use the same column classes to make them responsive for different '
'screen sizes.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;form&gt;\r\n'
' &lt;fieldset&gt;\r\n'
' &lt;legend&gt;Responsive form&lt;/legend&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-10 col-md-offset-1"&gt;\r\n'
' &lt;label for="username"&gt;username&lt;/label&gt;\r\n'
' &lt;input type="email" value="" id="username" '
'placeholder="username"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="row"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-10 col-md-offset-1"&gt;\r\n'
' &lt;label for="pwd"&gt;password&lt;/label&gt;\r\n'
' &lt;input type="password" value="" id="pwd" '
'placeholder="password"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/fieldset&gt;\r\n'
'&lt;/form&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0Apart from using <code>.row</code> '
'and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or '
'<code>.col-<span class="fore-primary">SCR_SZ</span>-<span '
'class="fore-secondary">COL_WD</span></code> for responsiveness, you '
'can also use other classes from the <strong>grid</strong> module '
'such as the offset classes to make your form layouts more '
'interesting.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;style&gt;\r\n'
' .label-aligned {\r\n'
' align-items: center;\r\n'
' }\r\n'
'&lt;/style&gt;\r\n'
'&lt;form&gt;\r\n'
' &lt;fieldset&gt;\r\n'
' &lt;legend&gt;Responsive form&lt;/legend&gt;\r\n'
' &lt;div class="row label-aligned"&gt;\r\n'
' &lt;div class="col-sm-12 col-md-4"&gt;\r\n'
' &lt;label for="username"&gt;username&lt;/label&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div class="col-sm-12 col-md"&gt;\r\n'
' &lt;input type="email" value="" id="username" '
'placeholder="username"&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;/fieldset&gt;\r\n'
'&lt;/form&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0When creating aligned forms using the '
"<strong>grid</strong> module's classes, labels might be off-center "
'vertically compared to their inline counterparts. Use a simple '
'styling for their parent <code>.row</code> element, if you want to '
'adjust their vertical alignment.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-normal col-lg-8 col-lg-offset-2">
<form>
<fieldset>
<legend>Inline form (default style)</legend>
<div class="input-group"><label for="username">Username</label> <input id="username" placeholder="username" type="email" value=""/>�</div>
<div class="input-group"><label for="pwd">Password</label> <input id="pwd" placeholder="password" type="password" value=""/></div>
</fieldset>
</form>
<form>
<fieldset>
<legend>Fluid form</legend>
<div class="input-group fluid"><label for="username2">Username</label> <input id="username2" placeholder="username" type="email" value=""/></div>
<div class="input-group fluid"><label for="pwd2">Password</label> <input id="pwd2" placeholder="password" type="password" value=""/></div>
</fieldset>
</form>
<form>
<fieldset>
<legend>Vertical form</legend>
<div class="input-group vertical"><label for="username2">Username</label> <input id="username2" placeholder="username" type="email" value=""/></div>
<div class="input-group vertical"><label for="pwd2">Password</label> <input id="pwd2" placeholder="password" type="password" value=""/></div>
</fieldset>
</form>
<form>
<fieldset>
<legend>Aligned form (using grid)</legend>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="number">Number</label>
</div>
<div class="col-sm-12 col-md">
<input id="number" style="width:85%;" type="number" value="42"/>
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="invalid">Invalid</label>
</div>
<div class="col-sm-12 col-md">
<input id="invalid" style="width:85%;" value="invalid"/>
</div>
<script>document.getElementById("invalid").setCustomValidity("This field is invalid");</script>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="disabled">Disabled</label>
</div>
<div class="col-sm-12 col-md">
<input disabled="" id="disabled" style="width:85%;" value="disabled"/>
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="readonly">Readonly</label>
</div>
<div class="col-sm-12 col-md">
<input id="readonly" readonly="" style="width:85%;" value="readonly"/>
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="select">Select</label>
</div>
<div class="col-sm-12 col-md">
<select id="select"> <option>Apples</option> <option>Oranges</option> </select>
</div>
</div>
</fieldset>
</form>
</div>,
'id': 'forms-input',
'module': 'input_control',
'name': 'Forms & input',
'notes': ['<li>Using the <code>&lt;fieldset&gt;</code> and '
'<code>&lt;legend&gt;</code> elements is highly recommended for a '
'better presentational effect. Using these elements is a matter of '
'personal preference, however try to keep your forms consistent '
'(i.e. either use them in all forms or no forms as to not confuse '
'users).</li>',
'<li>Some <code>&lt;input&gt;</code> elements, such as date &amp; '
'time, color and range types, are not supported and, as a result, '
'do not have a default style defined for them. You can define said '
'styles manually if you need to use them in your website or '
'app.</li>',
'<li>Checkboxes and radio buttons are not stylized the same way as '
'most of the other elements, nor do they follow the exact same '
'stucture for layout. Please refer to the next section for '
'information on how to use those.</li>',
"<li>Try not to combine the <strong>grid</strong> module's classes "
'with <code>.fluid</code> or <code>.vertical</code> '
'<code>.input-group</code>s, as this might cause certain styles to '
'overlap and not display exactly like you want them to.</li>']}
{'code': '&lt;div class="input-group"&gt;\r\n'
' &lt;input type="checkbox" id="switch1" tabindex="0"&gt;\r\n'
' &lt;label for="switch1" class="switch"&gt;Checkbox '
'switch&lt;/label&gt;\r\n'
'&lt;/div&gt;\r\n'
'\r\n'
'&lt;div class="input-group"&gt;\r\n'
' &lt;input type="radio" id="radswitch1" tabindex="0" '
'name="radio-group-1"&gt;\r\n'
' &lt;label for="radswitch1" class="switch"&gt;Radio '
'switch&lt;/label&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8 col-lg-normal">
<p style="text-align: justify;">Switches are almost identical in structure to checkboxes and radio buttons (an <code>.input-group</code> containing an <code>&lt;input&gt;</code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">"checkbox"</span></code> or <code><span class="fore-primary">"radio"</span></code>), followed immediately by a <code>&lt;label&gt;</code> linking to it), their only difference being that you need to add the <code>.switch</code> class to <code>&lt;label&gt;</code> element to turn your input into a switch. Remember to apply <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to your <code>&lt;input&gt;</code> to make it accessible.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12">\n'
'<pre>&lt;div class="input-group"&gt;\r\n'
' &lt;label for="switch1"&gt;Switch with text on its '
'left&lt;/label&gt;\r\n'
' &lt;input type="checkbox" id="switch1" tabindex="0"&gt;\r\n'
' &lt;label for="switch1" class="switch"&gt;&lt;/label&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0By using two '
'<code>&lt;label&gt;</code> elements, you can move the actual '
"<code>.switch</code> to the right of the label's text, effectively "
'allowing you to change the layout. Remember to not add any text to '
'your second <code>&lt;label&gt;</code> that implements the '
'<code>.switch</code> class. You might want, however, to add a few '
'trailing spaces to the first <code>&lt;label&gt;</code> element to '
'make sure the text does not get covered by the component.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4 col-lg-normal">
<div class="box-centered">
<br>
<div class="input-group">
<input id="switch-box" tabindex="0" type="checkbox"/>
<label class="switch" for="switch-box">Switch</label>
</div>
<br>
<br/>
</br></br></div>
</div>,
'id': 'switches',
'module': 'input_control',
'name': 'Switches',
'notes': ['<li>You can create your own color variants for the '
'<code>.switch</code> component. For more information, check out '
'the <a href="customization">customization page</a>.</li>']}
{'code': '&lt;header&gt;\r\n'
' &lt;label for="drawer-checkbox" class="button '
'drawer-toggle"&gt;&lt;/label&gt;\r\n'
'&lt;/header&gt;\r\n'
'\r\n'
'&lt;input type="checkbox" id="drawer-checkbox"&gt;\r\n'
'&lt;div class="drawer"&gt;\r\n'
' &lt;label for="drawer-checkbox" class="close"&gt;&lt;/label&gt;\r\n'
' &lt;a href="#"&gt;Home&lt;/a&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">The drawer component is used to create responsive and collapsible navigation menus. To create the drawer system, follow the steps presented below:</p>
<ul style="text-align: justify;">
<li>Inside your <code>&lt;header&gt;</code> element, add a <code>&lt;label&gt;</code> element with the <code>.drawer-toggle</code> class (remember to add the <code>.button</code> class to apply the necessary styles).</li>
<li>Create an <code>&lt;input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"&gt;</code> element. Give it an <code class="fore-secondary">id</code> to be able to link it to the necessary interactive elements.</li>
<li>Immediately after the previous <code>&lt;input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"&gt;</code>, create a <code>&lt;div&gt;</code> element with the <code>.drawer</code> class. This is where you will put your menu's contents.</li>
<li>Add an empty <code>&lt;label&gt;</code> element inside your <code>.drawer</code>, adding the <code>.close</code> class to it.</li>
<li>Finally, link the <code>.drawer-toggle</code> and <code>.close</code> elements to the <code class="fore-secondary">id</code> of your <code>&lt;input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"&gt;</code>.</li>
</ul>
<p style="text-align: justify;">Drawers are responsive and will expand into normal containers on larger screens. If you want to avoid this, add the <code>.persistent</code> class to both your <code>.drawer-toggle</code> and <code>.drawer</code> elements. You can also change the position of the drawer from the left side of the screen to the right by applying the <code>.right</code> class to your <code>.drawer</code> element.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;input type="checkbox" id="drawer-checkbox"&gt;\r\n'
'<span class="fore-secondary">&lt;!-- Other stuff here '
'--&gt;</span>\r\n'
'&lt;div class="drawer"&gt;\r\n'
' &lt;h3&gt;Bad drawer&lt;/h3&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0The syntax and structure of '
'the drawer container is very strict. Try to follow it exactly as '
'described in this section.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last">\n'
'<pre>&lt;header&gt;\r\n'
' &lt;label for="drawer-checkbox" class="button drawer-toggle '
'persistent"&gt;&lt;/label&gt;\r\n'
'&lt;/header&gt;\r\n'
'&lt;input type="checkbox" id="drawer-checkbox"&gt;\r\n'
'&lt;div class="drawer"&gt;...&lt;/div&gt;\r\n'
'&lt;!-- or --&gt;\r\n'
'&lt;header&gt;\r\n'
' &lt;label for="drawer-checkbox" class="button '
'drawer-toggle"&gt;&lt;/label&gt;\r\n'
'&lt;/header&gt;\r\n'
'&lt;input type="checkbox" id="drawer-checkbox"&gt;\r\n'
'&lt;div class="drawer peristent"&gt;...&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Remember to apply the '
'<code>.persistent</code> class to the <code>.drawer-toggle</code> '
'and <code>.drawer</code> elements to avoid unexpected '
'behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6 col-sm-first">\n'
'<pre>&lt;nav class="drawer"&gt;\r\n'
' &lt;label for="drawer-checkbox" class="close"&gt;&lt;/label&gt;\r\n'
' &lt;a href="#"&gt;Home&lt;/a&gt;\r\n'
'&lt;/nav&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can apply the '
'<code>.drawer</code> class to a <code>&lt;nav&gt;</code> element, '
"effectively making your page's navigation menu collapse on smaller "
'screen sizes.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-first col-md-normal">\n'
'<pre>&lt;div class="row"&gt;\r\n'
' &lt;input type="checkbox" id="drawer-checkbox"&gt;\r\n'
' &lt;div class="drawer col-md-4"&gt;\r\n'
' &lt;label for="drawer-checkbox" '
'class="close"&gt;&lt;/label&gt;\r\n'
' &lt;a href="#"&gt;Home&lt;/a&gt;\r\n'
' &lt;/div&gt;\r\n'
'\r\n'
' &lt;div class="col-sm-12 col-md-8"&gt;\r\n'
' &lt;p&gt;Page content&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can combine the '
'<code>.drawer</code> component with the grid system, similarly to '
'any other element or component. The <code>.drawer</code> will be '
"displayed as a slide-in menu on smaller screens, but it's part of "
'the layout on medium-sized and larger screens.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div style="height: 15rem;"><br/>
<style>.drawer.demo { position: absolute; height: 15rem; z-index: 0; top: 6.625rem; height: 12.5rem;} [type="checkbox"]:checked + .drawer.demo { z-index: 1001; margin-left: 0.75rem;}</style>
<header><label class="button drawer-toggle persistent" for="demo-toggle"></label></header> <br/>
<input id="demo-toggle" type="checkbox"/> <nav class="drawer demo persistent">
<label class="close" for="demo-toggle"></label><a href="#">Home</a> <span>News</span>
<a class="sublink-1" href="#">New Courses</a> <a class="sublink-1" href="#">Certifications</a>
<span class="sublink-1">Events</span> <a class="sublink-2" href="#">Course Showcase - 12th, Dec</a>
<a class="sublink-2" href="#">Staff AMA - 16th, Dec</a> <a class="sublink-1" href="#">Policy Update</a>
<a href="#">About</a> <a href="#">Contact</a><br/></nav>
</div>
</div>,
'id': 'drawer',
'module': 'navigation',
'name': 'Drawer',
'notes': ['<li>The <code>.drawer</code> component can be easily and '
'effectively combined with the <a '
'href="grid"><strong>grid</strong></a> module\'s system and '
'classes, as well as the <a '
'href="utility"><strong>utility</strong></a> module\'s responsive '
'visibility helper classes to create fully responsive navigation '
'menus.</li>',
"<li>It's best to use the <code>.drawer</code> component in "
'combination with a <code>&lt;header&gt;</code> element that has '
'the <code>.sticky</code> class (check the last section of this '
'page).</li>']}
{'code': '&lt;header&gt;\r\n'
' &lt;a href="#" class="logo"&gt;Logo&lt;/a&gt;\r\n'
' &lt;button&gt;Home&lt;/button&gt;\r\n'
' &lt;a href="#" class="button"&gt;News&lt;/a&gt;\r\n'
' &lt;span&gt;|&lt;/span&gt;\r\n'
' &lt;button&gt;About&lt;/button&gt;\r\n'
' &lt;a href="#" role="button"&gt;Contact&lt;/a&gt;\r\n'
'&lt;/header&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">The <code>&lt;header&gt;</code> HTML element is used for a page's top horizontal navigation menu. It can contain a unique <code>.logo</code> element as its first child (this structure is not mandatory, but still recommended as a best practice), which can be either text (with or without a link) or an image. The rest of the elements inside the <code>&lt;header&gt;</code> must be button elements (i.e. <code>&lt;button&gt;</code>, <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">"button"</span>&gt;</code>, <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> or <code>.button</code>) in order to be styled properly. Textual separators between those can be added using <code>&lt;span&gt;</code> elements.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;header&gt;\r\n'
' &lt;a href="#" class="button logo"&gt;Logo&lt;/a&gt;\r\n'
'&lt;/header&gt;\r\n'
'<span class="fore-secondary">&lt;!-- or --&gt;</span>\r\n'
'&lt;header&gt;\r\n'
' &lt;a href="#" class="logo"&gt;Logo&lt;/a&gt;\r\n'
' &lt;a href="#"&gt;Link&lt;/a&gt;\r\n'
'&lt;/header&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0The <code>.logo</code> element '
'should not be a <code>&lt;button&gt;</code> element, have the '
'<code>.button</code> class or the <code><span '
'class="fore-secondary">role</span>=<span class="fore-primary">"<a '
'href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> '
'attribute. On the other hand, links and labels in the '
'<code>&lt;header&gt;</code> should not be without a '
'<code>.button</code> class or a <code><span '
'class="fore-secondary">role</span>=<span class="fore-primary">"<a '
'href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> '
'attribute. Ignoring this rule might cause unexpected '
'behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;header&gt;\r\n'
' &lt;a href="#" class="logo"&gt;Logo&lt;/a&gt;\r\n'
' &lt;button&gt;Action 1&lt;/button&gt;\r\n'
' &lt;a href="#" class="button"&gt;Action 2&lt;/a&gt;\r\n'
' &lt;label class="button"&gt;Action 3&lt;/label&gt;\r\n'
'&lt;/header&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can mix different elements styled '
'like buttons inside a <code>&lt;header&gt;</code> element. In fact, '
'we strongly recommend doing so, if you need to.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div><br/>
<header>
<a class="logo" href="#">Logo</a> <button>Home</button>
<a class="button" href="#">News</a> <span>|</span>
<button>About</button> <button>Contact</button>
</header> <br/>
</div>
</div>,
'id': 'header',
'module': 'navigation',
'name': 'Header',
'notes': ['<li>The <code>&lt;header&gt;</code> element is partially '
'responsive on smaller screen devices. More specifically, when the '
'content inside it exceeds the width of the viewport (ie. overflows '
'to the right), users will be able to scroll horizontally in order '
'to see the rest of the menu.</li>',
'<li>The <code>&lt;header&gt;</code> element does not display as '
'<code class="fore-tertiary">fixed</code> by default. You can, '
'however, alter this CSS property manually, if you so desire.</li>']}
{'code': '&lt;nav&gt;\r\n'
' &lt;a href="#"&gt;Home&lt;/a&gt;\r\n'
' &lt;span&gt;News&lt;/span&gt;\r\n'
' &lt;a href="#" class="sublink-1"&gt;New Courses&lt;/a&gt;\r\n'
' &lt;a href="#" class="sublink-1"&gt;Certifications&lt;/a&gt;\r\n'
' &lt;span class="sublink-1"&gt;Events&lt;/span&gt;\r\n'
' &lt;a href="#" class="sublink-2"&gt;Course Showcase - 12th, '
'Dec&lt;/a&gt;\r\n'
' &lt;a href="#" class="sublink-2"&gt;Staff AMA - 16th, '
'Dec&lt;/a&gt;\r\n'
' &lt;a href="#" class="sublink-1"&gt;Policy Update&lt;/a&gt;\r\n'
' &lt;a href="#"&gt;About&lt;/a&gt;\r\n'
' &lt;a href="#"&gt;Contact&lt;/a&gt;\r\n'
'&lt;/nav&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8 col-lg-normal">
<p style="text-align: justify;">To add vertical navigation to your websites, use the <code>&lt;nav&gt;</code> HTML element. Adding links is pretty simple, just use <code>&lt;a&gt;</code> elements, no lists or anything else required. In order to add subcategories to your vertical navigation, use any normal textual element as the title of the subcategory and follow it with its links as normal, adding the <code>.sublink-1</code> class to them. Similarly, you can create a subcategory with a depth of 2, using a similar structure and the <code>.sublink-2</code> class.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12">\n'
'<pre>&lt;div class="col-sm-12 col-sm-last col-md-3 '
'col-md-first"&gt;\r\n'
' &lt;nav&gt;\r\n'
' <span class="fore-tertiary">&lt;!-- navigation content '
'--&gt;</span>\r\n'
' &lt;/nav&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0We strongly recommend using the '
'<code>&lt;nav&gt;</code> element in combination with the <a '
'href="grid"><strong>grid</strong></a> module to make your layouts '
'more responsive. For example, you could make your sidebar appear on '
'the left side of your content in medium-sized and larger screens, '
'but move to the very bottom of your content on smaller screens.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4 col-lg-normal">
<div><br/>
<nav>
<a href="#">Home</a> <span>News</span>
<a class="sublink-1" href="#">New Courses</a> <a class="sublink-1" href="#">Certifications</a>
<span class="sublink-1">Events</span> <a class="sublink-2" href="#">Course Showcase - 12th, Dec</a>
<a class="sublink-2" href="#">Staff AMA - 16th, Dec</a> <a class="sublink-1" href="#">Policy Update</a>
<a href="#">About</a> <a href="#">Contact</a>
</nav><br/>
</div>
</div>,
'id': 'navigation-bar',
'module': 'navigation',
'name': 'Navigation bar',
'notes': ['<li>Subcategories and their links support a depth of 2 by default. '
'If, however, you need more than that, we recommend you check the '
'<a href="customization">customization page</a> for instructions on '
'how to add more depth to the vertical navigation.</li>',
'<li>We strongly suggest you do not add irrelevant things inside '
'your <code>&lt;nav&gt;</code> element, like images or text that '
'are not part of the navigation menu.</li>']}
{'code': '&lt;header class="sticky"&gt;\r\n'
' &lt;a href="#" class="logo"&gt;Logo&lt;/a&gt; '
'&lt;button&gt;Home&lt;/button&gt; '
'&lt;button&gt;About&lt;/button&gt;\r\n'
'&lt;/header&gt;\r\n'
'\r\n'
'&lt;footer class="sticky"&gt;\r\n'
' &lt;p&gt;&amp;copy; 2001-2016 Web Corporation | &lt;a '
'href="#"&gt;About&lt;/a&gt; | &lt;a href="#"&gt;Terms of '
'use&lt;/a&gt;&lt;/p&gt;\r\n'
'&lt;/footer&gt;',
'desc': <div class="col-sm-12">
<p style="text-align: justify;">You can create sticky headers and footers, using the <code>.sticky</code> class on either of these elements.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': [],
'example': '',
'id': 'sticky',
'module': 'navigation',
'name': 'Sticky headers and footers',
'notes': ['<li>Sticky headers and footers are compatible with modern '
'browsers, but might not display properly in older browsers. '
'Support is being added over time, so be sure to check out if your '
'target platforms support <a '
'href="https://caniuse.com/#feat=css-sticky"><code>position:sticky</code></a>.</li>']}
{'code': '&lt;progress value="0" max="1000"&gt;&lt;/progress&gt;\r\n'
'&lt;progress value="450" max="1000"&gt;&lt;/progress&gt;\r\n'
'&lt;progress value="1000" max="1000"&gt;&lt;/progress&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">To create a progress bar, use the <code>&lt;progress&gt;</code> HTML element, specify the preset maximum of <code><span class="fore-secondary">max</span>=<span class="fore-primary">"1000"</span></code> and set a <code>value</code> between <code>0</code> and <code>1000</code>. Update your <code>&lt;progress&gt;</code> element using some Javascript code, by changing its <code>value</code> to any integer in the same range.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;progress value="80" max="100"&gt;&lt;/progress&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using different values '
"for the <code>&lt;progress&gt;</code> element's <code>max</code>, "
'except for the preset one (<code>1000</code>).</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;progress value="450.5" '
'max="1000.0"&gt;&lt;/progress&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Try not to use floating point '
"values for either the <code>&lt;progress&gt;</code> element's "
'<code>value</code> or <code>max</code>. During testing of the '
'module, we found that floating point values could cause unexpected '
'behavior.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<p>Process is 0% complete!</p> <progress max="1000" value="0"></progress>
<p>Process is 45% complete!</p> <progress max="1000" value="450"></progress>
<p>Process is 100% complete!</p> <progress max="1000" value="1000"></progress>
</div>,
'id': 'basic-progress-bar',
'module': 'progress',
'name': 'Basic progress bar',
'notes': ['<li>We made sure that the <code>&lt;progress&gt;</code> element '
'displays properly on all modern browsers, using browser-specific '
'rules. However, there might be some irregularities with older '
'browsers, especially legacy versions of Internet Explorer.</li>',
'<li>If the preset <code>max="1000"</code> does not suit your '
'needs, you should check the <a href="customization">customization '
'page</a> for instructions on how to set your own maximum value for '
'the <code>&lt;progress&gt;</code> element.</li>']}
{'code': '&lt;div class="spinner-donut"&gt;&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">Donut spinners can be used to indicate that something is loading or that a process is running in the background. To create a donut spinner, add the <code>.spinner-donut</code> class to an element of your liking. We would recommend using a <code>&lt;div&gt;</code> element for most cases, but <code>&lt;span&gt;</code> elements should work pretty well, too.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div '
'class="spinner-donut"&gt;Loading...&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid inserting text inside '
'the <code>.spinner-donut</code>, as this might cause unexpected '
'bahavior and will probably make the text spin along with it.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;p&gt;Loading... &lt;span '
'class="spinner-donut"&gt;&lt;/span&gt;&lt;/p&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can place a '
'<code>.spinner-donut</code> inside a paragraph or some other textual '
'context and it will display inline.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="box-centered"><br/>
<div class="spinner-donut"></div><br/>
</div>
</div>,
'id': 'donut-spinner',
'module': 'progress',
'name': 'Donut spinner',
'notes': ['<li>The <code>.spinner-donut</code> is an animated component, '
'meaning that if a browsers does not support animation, this '
'element might display incorrectly.</li>',
'<li>In certain cases, it might be useful to add the <code><span '
'class="fore-secondary">role</span>=<span class="fore-primary">"<a '
'href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_progressbar_role">progressbar</a>"</span></code> '
'attribute to increase donut spinner accessibility.</li>']}
{'code': '&lt;progress class="secondary" value="600" '
'max="1000"&gt;&lt;/progress&gt;\r\n'
'&lt;progress class="tertiary" value="300" '
'max="1000"&gt;&lt;/progress&gt;\r\n'
'&lt;progress class="inline" value="150" '
'max="1000"&gt;&lt;/progress&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">Apart from the default style for the <code>&lt;progress&gt;</code> element, we have also included a couple of variants for it. As with many other elements, you can change the color of your progress bars, based on the context, using the <code>.secondary</code> or <code>.tertiary</code> class. You can also make a <code>&lt;progress&gt;</code> element display inline, using the <code>.inline</code> class.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;progress class="secondary teriary" value="450" '
'max="1000"&gt;&lt;/progress&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid mixing two classes of '
'the same type (i.e. two color classes or two size classes).</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;progress class="inline secondary" value="800" '
'max="1000"&gt;&lt;/progress&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;progress class="inline tertiary" value="650" '
'max="1000"&gt;&lt;/progress&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can mix size and color classes '
'for <code>&lt;progress&gt;</code> elements as needed.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<p>Secondary process is 60% complete!</p> <progress class="secondary" max="1000" value="600"></progress>
<p>Tertiary process is 30% complete!</p> <progress class="tertiary" max="1000" value="300"></progress>
<p>Inline progress bar:<progress class="inline" max="1000" value="150"></progress></p>
</div>,
'id': 'progress-variants',
'module': 'progress',
'name': 'Progress bar variants',
'notes': ['<li>If you want to add your own custom size classes for '
'<code>&lt;progress&gt;</code> elements, check the <a '
'href="customization">customization page</a> for '
'instructions.</li>']}
{'code': '&lt;div class="spinner-donut secondary"&gt;&lt;/div&gt;\r\n'
'&lt;div class="spinner-donut tertiary"&gt;&lt;/div&gt;\r\n'
'&lt;div class="spinner-donut large"&gt;&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">Apart from the default donut spinner style, there are also two more contextual color classes: <code>.secondary</code> and <code>.tertiary</code>. If your donut spinners are too small, you can also use the <code>.large</code> class to make it pop out a little bit more.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="box-centered"><br/>
<div class="spinner-donut secondary"></div><br/> <div class="spinner-donut tertiary"></div><br/> <div class="spinner-donut large"></div><br/>
</div>
</div>,
'id': 'spinner-variants',
'module': 'progress',
'name': 'Donut spinner variants',
'notes': ['<li>You can mix one of the contextual color classes and the '
'<code>.large</code> class, if you want, similarly to what you can '
'do with progress bars.</li>']}
{'code': '&lt;div class="tabs"&gt;\r\n'
' &lt;input type="radio" name="tab-group" id="tab1" checked '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="tab1" aria-hidden="true"&gt;Tab 1&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Tab 1&lt;/h3&gt;\r\n'
" &lt;p&gt;This is the first tab's content.&lt;/p&gt;\r\n"
' &lt;/div&gt;\r\n'
' &lt;input type="radio" name="tab-group" id="tab2" '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="tab2" aria-hidden="true"&gt;Tab 2&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Tab 2&lt;/h3&gt;\r\n'
" &lt;p&gt;This is the second tab's content.&lt;/p&gt;\r\n"
' &lt;/div&gt;\r\n'
' &lt;input type="radio" name="tab-group" id="tab3" '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="tab3" aria-hidden="true"&gt;Tab 3&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Tab 3&lt;/h3&gt;\r\n'
" &lt;p&gt;This is the third tab's content.&lt;/p&gt;\r\n"
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8">
<p style="text-align:justify">The tab container's basic syntax is composed of two components, presented below in the order they should be added to the DOM tree:</p>
<ul style="text-align:justify">
<li>At the outermost level of the tab container is a <code>&lt;div&gt;</code> element implementing the <code>.tabs</code> class. This serves as the wrapper of the tab container.</li>
<li>Inside the <code>.tabs</code> container, add a set of the following three elements for each tab:
<ol>
<li>First, add an <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">"radio"</span>&gt;</code> element. Give it a <code><span class="fore-secondary">name</span></code> and an <code><span class="fore-secondary">id</span></code> in order to be able to link to it and group it with the rest of the radio buttons in the container.</li>
<li>Follow the <code>&lt;input&gt;</code> element with a <code>&lt;label&gt;</code> element linking to it. Inside this element, add the text you want to be shown as the title of your tab.</li>
<li>Finally, add a <code>&lt;div&gt;</code> immediately after the <code>&lt;label&gt;</code>'s closing tag. This will be the panel that contains the tab's content. Inside this element, you can add all the content you want in your tab (headings, images, text).</li>
</ol>
</li>
</ul>
<p style="text-align:justify">Tabs are responsive and will collapse into a stacked display on smaller screens, allowing the user to view the actual content more easily. The tab container's syntax is accessible, but parts of it might confuse screen readers, so we suggest adding the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to all the <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code> elements inside the <code>.tabs</code> container.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="tabs"&gt;\r\n'
' &lt;input type="checkbox" name="tab-group" id="tab1" checked '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="tab1" aria-hidden="true"&gt;Tab '
'1&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Bad Tab&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Do not use checkboxes inside '
'the default <code>.tabs</code> container, otherwise you might '
'notice unexpected behavior. If you want to use an <code>&lt;input '
'<span class="fore-secondary">type</span>=<span '
'class="fore-primary">"checkbox"</span>&gt;</code>, check out the '
'next section.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="tabs"&gt;\r\n'
' &lt;input type="radio" name="tab-group" id="tab1" checked '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="tab1" aria-hidden="true"&gt;Tab '
'1&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Lonely Tab&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0You can add a single tab in a '
'<code>.tabs</code> container, but what use would that be? You '
'should probably read the next section to see what you can do with '
'a stacked tab container instead.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="tabs"&gt;\r\n'
' &lt;input type="radio" name="tab-group" id="tab1" checked '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="tab1" aria-hidden="true"&gt;Tab '
'1&lt;/label&gt;\r\n'
' &lt;input type="radio" name="tab-group" id="tab2" '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="tab2" aria-hidden="true"&gt;Tab '
'2&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Bad Tab&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Bad Tab&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0The syntax and structure of '
'the tab container is very strict. Try to follow it exactly as '
'described in this section.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="tabs"&gt;\r\n'
' &lt;input type="radio" name="tab-group" id="tab1" checked&gt;\r\n'
' &lt;label for="tab1"&gt;Tab&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Not fully accessible tab&lt;/h3&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Remember to use the '
'<code><span class="fore-secondary">aria-hidden</span>=<span '
'class="fore-primary">"true"</span></code> attribute to make your '
'tabs fully accessible.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4">
<div class="tabs" style="margin-top: 5px; margin-bottom: 5px;">
<input aria-hidden="true" checked="" id="tab1" name="tabdemo" type="radio"/>
<label aria-hidden="true" for="tab1">Tab 1</label>
<div> <h3>Tab 1</h3> <p>This is the first tab's content.</p> </div>
<input aria-hidden="true" id="tab2" name="tabdemo" type="radio"/>
<label aria-hidden="true" for="tab2">Tab 2</label>
<div> <h3>Tab 2</h3> <p>This is the second tab's content.</p> </div>
<input aria-hidden="true" id="tab3" name="tabdemo" type="radio"/>
<label aria-hidden="true" for="tab3">Tab 3</label>
<div> <h3>Tab 3</h3> <p>This is the third tab's content.</p> </div>
<input aria-hidden="true" id="tab4" name="tabdemo" type="radio"/>
<label aria-hidden="true" for="tab4">Tab 4</label>
<div> <h3>Tab 4</h3> <p>This is the fourth tab's content.</p> </div>
</div>
</div>,
'id': 'basic-syntax',
'module': 'tab',
'name': 'Basic syntax',
'notes': ['<li>Tabs are compatible with modern browsers, but might not '
'display properly in older browsers.</li>',
'<li>Remember to add the <code><span '
'class="fore-secondary">checked</span></code> attribute to one of '
'your <code>&lt;input&gt;</code>s if you want that tab to be the '
'one displayed by default. If none is specified, the first one will '
'be displayed.</li>',
"<li>The <code>height</code> of the tab container's panel area is "
'<code>400px</code>. If you want to change this default size, '
'please check out the <a href="customization">customization</a> '
'page.</li>',
'<li>Using the method described above for making tabs accessible, '
'screen readers will ignore tab controls and only read the content '
'of tabs.</li>']}
{'code': '&lt;div class="tabs stacked"&gt;\r\n'
' &lt;input type="radio" name="accordion" id="a1" checked '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="a1" aria-hidden="true"&gt;Accordion section '
'1&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Section 1&lt;/h3&gt;\r\n'
" &lt;p&gt;This is the first accordion section's "
'content.&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;input type="radio" name="accordion" '
'id="a2"aria-hidden="true"&gt;\r\n'
' &lt;label for="a2" aria-hidden="true"&gt;Accordion section '
'2&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;h3&gt;Section 2&lt;/h3&gt;\r\n'
" &lt;p&gt;This is the second accordion section's "
'content.&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;\r\n'
'\r\n'
'&lt;div class="tabs stacked"&gt;\r\n'
' &lt;input type="checkbox" id="c1" aria-hidden="true"&gt;\r\n'
' &lt;label for="c1" aria-hidden="true"&gt;Collapse section '
'1&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
" &lt;p&gt;This is the first collapse section's "
'content.&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
' &lt;input type="checkbox" id="c2" aria-hidden="true"&gt;\r\n'
' &lt;label for="c2" aria-hidden="true"&gt;Collapse section '
'2&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
" &lt;p&gt;This is the second collapse section's "
'content.&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8">
<p style="text-align:justify">Apart from the normal tab layout, you can make your tabs stacked instead, using the <code>.stacked</code> class in your <code>.tabs</code> container element. Stacked tabs are more versatile, allowing you to use checkboxes and/or radio buttons to implement collapses, accordions and spoilers. Carousel-styled elements can also be displayed in this fashion, if you wish. Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to make your tabs fully accessible, as before.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;div class="tabs stacked"&gt;\r\n'
' &lt;input type="radio" name="accordion" id="a1" checked '
'aria-hidden="true"&gt;\r\n'
' &lt;label for="a1" aria-hidden="true"&gt;Single accordion '
'section&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;p&gt;This accordion section cannot close once '
'opened&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid having a single '
'radio-based tab in a <code>.tabs</code><code>.stacked</code> '
'container, as this might result in unexpected behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="tabs stacked"&gt;\r\n'
' &lt;input type="checkbox" id="c1" aria-hidden="true"&gt;\r\n'
' &lt;label for="c1" aria-hidden="true"&gt;Single '
'collapse&lt;/label&gt;\r\n'
' &lt;div&gt;\r\n'
' &lt;p&gt;This is a singular collapse.&lt;/p&gt;\r\n'
' &lt;/div&gt;\r\n'
'&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can implement single collapses '
'(otherwise known as spoilers), using a '
'<code>.tabs</code><code>.stacked</code> container with only one '
'checkbox-based tab.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4">
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
<input aria-hidden="true" checked="" id="a1" name="accordion" type="radio"/>
<label aria-hidden="true" for="a1">Accordion section 1</label>
<div> <h3>Section 1</h3> <p>This is the first accordion section's content.</p> </div>
<input aria-hidden="true" id="a2" name="accordion" type="radio"/>
<label aria-hidden="true" for="a2">Accordion section 2</label>
<div> <h3>Section 2</h3> <p>This is the second accordion section's content.</p> </div>
</div>
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
<input aria-hidden="true" id="c1" type="checkbox"/>
<label aria-hidden="true" for="c1">Collapse section 1</label>
<div> <p>This is the first collapse section's content.</p> </div>
<input aria-hidden="true" id="c2" type="checkbox"/>
<label aria-hidden="true" for="c2">Collapse section 2</label>
<div> <p>This is the second collapse section's content.</p> </div>
</div>
</div>,
'id': 'stacked-tabs',
'module': 'tab',
'name': 'Stacked tabs',
'notes': ['<li><code>.stacked</code> tabs can be used with either checkboxes '
'or radio buttons.</li>',
'<li>You can mix and match checkboxes and radio buttons, but we '
'suggest you do not do so, unless you think it is necessary for '
'your design.</li>']}
{'code': '&lt;table class="horizontal"&gt;\r\n'
' &lt;caption&gt;People&lt;/caption&gt;\r\n'
' &lt;thead&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;Name&lt;/th&gt;\r\n'
' &lt;th&gt;Surname&lt;/th&gt;\r\n'
' &lt;th&gt;Alias&lt;/th&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;/thead&gt;\r\n'
' &lt;tbody&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Chad&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Wilberts&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;MrOne&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Adam&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Smith&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;TheSmith&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Sophia&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Canderson&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;Candee&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;/tbody&gt;\r\n'
'&lt;/table&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">Scrollable tables are very similar to horizontal ones and can be created by simply adding the <code>.scrollable</code> class to the root element of your table (i.e. the <code>&lt;table&gt;</code> element). Similarly to horizontal ones, they can accommodate as many data rows as you like, making their overflow scrollable, while they do not support the <code>&lt;tfoot&gt;</code> element. As usual, remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12">\n'
'<pre>&lt;table class="horizontal scrollable"&gt;\r\n'
' <span class="fore-secondary">&lt;!-- Bad table --&gt;</span>\r\n'
' &lt;thead&gt;\r\n'
' <span class="fore-secondary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/thead&gt;\r\n'
' &lt;tbody&gt;\r\n'
' <span class="fore-secondary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/tbody&gt;\r\n'
'&lt;/table&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid comibing the '
'<code>.horizontal</code> and <code>.scrollable</code> classes on '
'the same element, as this can cause unexpected behavior.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div>
<br/><table class="horizontal preset">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
</tbody>
</table><br/>
</div>
</div>,
'id': 'horizontal-tables',
'module': 'table',
'name': '\nHorizontal tables\n',
'notes': ['<li>Due to <code>.horizontal</code> tables utilizing the <a '
'href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox '
'Layout</a>, some older browsers may not properly display these '
'tables. This is especially true with legacy versions of Internet '
'Explorer.</li>',
'<li>Mixing the Flexible Layout Module with '
'<code>&lt;table&gt;</code> elements seems to upset some browsers. '
'We noticed this on an older mobile version of Firefox, where our '
'implementation should work in theory, given the fact that both '
'features are properly supported. If you notice any problems with '
'<code>.horizontal</code> tables, feel free to <a '
'href="https://github.com/Chalarangelo/mini.css/issues/new">submit '
'a new issue on Github</a>.</li>']}
{'code': '&lt;table class="scrollable"&gt;\r\n'
' &lt;caption&gt;People&lt;/caption&gt;\r\n'
' &lt;thead&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;Name&lt;/th&gt;\r\n'
' &lt;th&gt;Surname&lt;/th&gt;\r\n'
' &lt;th&gt;Alias&lt;/th&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;/thead&gt;\r\n'
' &lt;tbody&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Chad&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Wilberts&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;MrOne&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Adam&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Smith&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;TheSmith&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Sophia&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Canderson&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;Candee&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;/tbody&gt;\r\n'
'&lt;/table&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">Scrollable tables can be created by simply adding the <code>.scrollable</code> class to the root element of your table (i.e. the <code>&lt;table&gt;</code> element). Scrollable tables are flexible, so they can accommodate any amount of data rows and, if there is a lot of data, they will make their overflow scrollable. Remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors. Keep in mind, however, that <code>.horizontal</code> tables do not support the <code>&lt;tfoot&gt;</code> element.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12">\n'
'<pre>&lt;table class="scrollable"&gt;\r\n'
' <span class="fore-secondary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;tfoot&gt;\r\n'
' <span class="fore-secondary">&lt;!-- Do not do this! '
'--&gt;</span>\r\n'
' &lt;/tfoot&gt;\r\n'
' <span class="fore-secondary">&lt;!-- ... --&gt;</span>\r\n'
'&lt;/table&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0We already explicitly stated '
'that, due to the way <code>.scrollable</code> tables are styled, '
'the <code>&lt;tfoot&gt;</code> element is not supported. Please '
'refer to the last section of this page if you need to use this '
'element and you want to have a scrollable table layout.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div>
<br/><table class="scrollable preset">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
<tr><td data-label="Name">Mark</td><td data-label="Surname">Gerkis</td><td data-label="Alias">Markie</td></tr>
<tr><td data-label="Name">John</td><td data-label="Surname">Fergusson</td><td data-label="Alias">Fergujohn</td></tr>
<tr><td data-label="Name">Sylvia</td><td data-label="Surname">Pouleau</td><td data-label="Alias">Sylver</td></tr>
<tr><td data-label="Name">Norman</td><td data-label="Surname">Jones</td><td data-label="Alias">NormalJones</td></tr>
<tr><td data-label="Name">Trevor</td><td data-label="Surname">Heidel</td><td data-label="Alias">Heidi</td></tr>
</tbody>
</table><br/>
</div>
</div>,
'id': 'scrollable-tables',
'module': 'table',
'name': '\nScrollable tables\n',
'notes': ['<li>Due to <code>.scrollable</code> tables utilizing the <a '
'href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox '
'Layout</a>, some older browsers may not properly display these '
'tables. This is especially true with legacy versions of Internet '
'Explorer.</li>',
'<li>Mixing the Flexible Layout Module with '
'<code>&lt;table&gt;</code> elements seems to upset some browsers. '
'We noticed this on an older mobile version of Firefox, where our '
'implementation should work in theory, given the fact that both '
'features are properly supported. If you notice any problems with '
'<code>.scrollable</code> tables, feel free to <a '
'href="https://github.com/Chalarangelo/mini.css/issues/new">submit '
'a new issue on Github</a>.</li>',
'<li><code>.scrollable</code> tables have a default maximum height '
'of <code>400px</code>. If you want to change this, you should '
'check out the <a href="customization">customization</a> '
'page.</li>']}
{'code': '&lt;table&gt;\r\n'
' &lt;caption&gt;People&lt;/caption&gt;\r\n'
' &lt;thead&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;Name&lt;/th&gt;\r\n'
' &lt;th&gt;Surname&lt;/th&gt;\r\n'
' &lt;th&gt;Alias&lt;/th&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;/thead&gt;\r\n'
' &lt;tbody&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Chad&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Wilberts&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;MrOne&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Adam&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Smith&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;TheSmith&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Sophia&lt;/td&gt;\r\n'
' &lt;td data-label="Surname"&gt;Canderson&lt;/td&gt;\r\n'
' &lt;td data-label="Alias"&gt;Candee&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;/tbody&gt;\r\n'
'&lt;/table&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">Table layout utilizes the <code>&lt;table&gt;</code> HTML element with the following structure (usual tabular structure):</p>
<ol style="text-align: justify;">
<li>On the outermost level, there is the <code>&lt;table&gt;</code> element.</li>
<li>If you want to include a <code>&lt;caption&gt;</code> element, it must by the first element inside the <code>&lt;table&gt;</code> element.</li>
<li>Following the above, you need to add a <code>&lt;thead&gt;</code> element. Inside it, you should usually add one <code>&lt;tr&gt;</code> element, which contains one or more <code>&lt;th&gt;</code> elements.</li>
<li>Immediately after the <code>&lt;thead&gt;</code> element, you can add a <code>&lt;tfoot&gt;</code> element, if you want to. Inside it, you should usually add one or more <code>&lt;tr&gt;</code> elements, which contain one or more <code>&lt;td&gt;</code> elements. </li>
<li>Finally, add your <code>&lt;tbody&gt;</code> element. Inside it, you should usually add one or more <code>&lt;tr&gt;</code> elements, which contain one or more <code>&lt;td&gt;</code> elements. For each <code>&lt;td&gt;</code> element, specify a <code>data-label</code> attribute equal to the heading of the column. This enables responsibility for your table, so that the values in the columns will be properly labeled on mobile devices.</li>
</ol>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;tr&gt;\r\n'
' &lt;td&gt;Chad&lt;/td&gt;\r\n'
' &lt;td&gt;Wilberts&lt;/td&gt;\r\n'
' &lt;td&gt;MrOne&lt;/td&gt;\r\n'
'&lt;/tr&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Remember to always add a '
'<code>data-label</code> attribute to your <code>&lt;td&gt;</code> '
"elements, as the table's card view is very dependent on them to "
'display properly. <code>&lt;th&gt;</code> elements, however, do '
'not require or utilize this attribute.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;table&gt;\r\n'
' &lt;caption&gt;People&lt;/caption&gt;\r\n'
' &lt;thead&gt;\r\n'
' <span class="fore-secondary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/thead&gt;\r\n'
' &lt;tbody&gt;\r\n'
' <span class="fore-secondary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/tbody&gt;\r\n'
' &lt;tfoot&gt;\r\n'
' <span class="fore-secondary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/tfoot&gt;\r\n'
'&lt;/table&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0The <code>&lt;tfoot&gt;</code> '
'element must always be immediately after the '
'<code>&lt;thead&gt;</code> element, if included.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;tbody&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;Name&lt;/th&gt;\r\n'
' &lt;td data-label="Name"&gt;Chad&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
'&lt;/tbody&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid inserting '
'<code>&lt;th&gt;</code> elements inside your '
'<code>&lt;tbody&gt;</code> element. If you want to make your '
'tables horizontal or preset their styling in a manner different '
'from the one shown in the previous examples, check the below '
'sections.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;thead&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;td data-label="Name"&gt;Chad&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
'&lt;/thead&gt;</pre>\n'
'<p class="dont" style="text-align: justify;"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using '
'<code>&lt;td&gt;</code> elements inside your '
'<code>&lt;thead&gt;</code>. You should use a '
'<code>&lt;tbody&gt;</code> element instead.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div>
<h4>Medium/Large screen layout</h4><hr/>
<table class="preset">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
</tbody>
</table>
<br/>
<h4>Small screen layout</h4><hr/>
<table id="carded">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
</tbody>
</table>
<br/>
</div>
</div>,
'id': 'syntax-responsiveness',
'module': 'table',
'name': 'Basic syntax & responsiveness',
'notes': ['<li>Tables are responsive by default and will change to a '
"card-like view below a certain screen width. If you'd rather not "
'make them responsive, check the last section on this page.</li>',
'<li>Specifying the <code>data-label</code> attribute is essential '
'for the responsive version of a table to display properly. You '
"can, however, use a value different from the column's name. Make "
'sure it does not confuse your users, though.</li>',
'<li>We strongly suggest you avoid adding multiple rows in your '
'<code>&lt;thead&gt;</code> element, as it could cause problems '
'with accessibility. However, if you absolutely must, you might '
'want to check <a '
'href="https://codepen.io/chalarangelo/pen/VPqWQE">this codepen</a> '
'for an idea on how to deal with irregular border styling.</li>']}
{'code': '&lt;table class="preset"&gt;\r\n'
' &lt;caption&gt;Star Wars Character Alignment '
'Table&lt;/caption&gt;\r\n'
' &lt;tbody&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;&lt;/th&gt;\r\n'
' &lt;th&gt;Lawful&lt;/td&gt;\r\n'
' &lt;th&gt;Neutral&lt;/td&gt;\r\n'
' &lt;th&gt;Chaotic&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;Good&lt;/th&gt;\r\n'
' &lt;td&gt;Yoda&lt;/td&gt;\r\n'
' &lt;td&gt;Luke Skywalker&lt;/td&gt;\r\n'
' &lt;td&gt;Chewbacca&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;Neutral&lt;/th&gt;\r\n'
' &lt;td&gt;C-3PO&lt;/td&gt;\r\n'
' &lt;td&gt;Boba Fett&lt;/td&gt;\r\n'
' &lt;td&gt;Han Solo&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;tr&gt;\r\n'
' &lt;th&gt;Bad&lt;/th&gt;\r\n'
' &lt;td&gt;Darth Vader&lt;/td&gt;\r\n'
' &lt;td&gt;Emperor Palpatine&lt;/td&gt;\r\n'
' &lt;td&gt;Jabba the Hutt&lt;/td&gt;\r\n'
' &lt;/tr&gt;\r\n'
' &lt;/tbody&gt;\r\n'
'&lt;/table&gt;\r\n'
'\r\n'
'&lt;table class="striped"&gt;\r\n'
' &lt;caption&gt;People&lt;/caption&gt;\r\n'
' &lt;thead&gt;\r\n'
' <span class="fore-primary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/thead&gt;\r\n'
' &lt;tbody&gt;\r\n'
' <span class="fore-primary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/tbody&gt;\r\n'
'&lt;/table&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align: justify;">Tables are responsive by default, however you can disable this functionality for one or more tables (normal or <code>.horizontal</code>), using the <code>.preset</code> class. This class can also be used for a multitude of things, like dealing with tables not allowing you to have <code>&lt;th&gt;</code> elements inside the <code>&lt;tbody&gt;</code> element, building matrices (i.e. tables with a header column and a header row) etc. Finally, you can make your tables use a different color for every other row, using the <code>.striped</code> class.</p>
<h3>Sample code</h3>
<p>The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. By the way, we present a sample for a matrix table in he first example, but you can use the same principles and classes to create any table layout you wish.</p><br/>
<div class="container"><div class="row"><div class="tabs stacked">
<input id="grid-base-sample" type="checkbox"/>
<label for="grid-base-sample">Show sample code</label>
<div>
</div></div></div></div><br/>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;style&gt;\r\n'
' .border-fix &gt; td, .border-fix &gt; th {\r\n'
' border-top: 0;\r\n'
' }\r\n'
'&lt;/style&gt;\r\n'
'\r\n'
'&lt;table class="preset"&gt;\r\n'
' &lt;tbody&gt;\r\n'
' &lt;tr class="border-fix"&gt;\r\n'
' <span class="fore-tertiary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/tr&gt;\r\n'
' <span class="fore-tertiary">&lt;!-- ... --&gt;</span>\r\n'
' &lt;/tbody&gt;\r\n'
'&lt;/table&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0The first row in a preset matrix '
'table or any table without a <code>&lt;thead&gt;</code> element will '
'have an extra border at the top. You can use a generic class to set '
'<code>border-top: 0;</code> for the elements inside that row to fix '
'this.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;table class="horizontal preset"&gt;\r\n'
' <span class="fore-tertiary">&lt;!-- ... -&gt;</span>\r\n'
'&lt;/table&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;table class="horizontal striped"&gt;\r\n'
' <span class="fore-tertiary">&lt;!-- ... -&gt;</span>\r\n'
'&lt;/table&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;table class="preset striped"&gt;\r\n'
' <span class="fore-tertiary">&lt;!-- ... -&gt;</span>\r\n'
'&lt;/table&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;table class="preset horizontal striped"&gt;\r\n'
' <span class="fore-tertiary">&lt;!-- ... -&gt;</span>\r\n'
'&lt;/table&gt;</pre>\n'
'<p class="do" style="text-align: justify;"><mark '
'class="tertiary">Do:</mark>\xa0You can combine any two of the '
'following classes without any problems: <code>.horizontal</code>, '
'<code>.preset</code>, <code>.striped</code>. Just make sure you '
"respect each one's specific rules.</p>\n"
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div><br/>
<table class="preset">
<caption>Star Wars Character Alignment Table</caption>
<tbody>
<tr class="border-fix"><th></th><th>Lawful</th><th>Neutral</th><th>Chaotic</th></tr>
<tr><th>Good</th><td>Yoda</td><td>Luke Skywalker</td><td>Chewbacca</td></tr>
<tr><th>Neutral</th><td>C-3PO</td><td>Boba Fett</td><td>Han Solo</td></tr>
<tr><th>Bad</th><td>Darth Vader</td><td>Emperor Palpatine</td><td>Jabba the Hutt</td></tr>
</tbody>
</table><br/>
</div>
</div>,
'id': 'variants-matrices',
'module': 'table',
'name': 'Table variants & matrices',
'notes': ['<li>Making a table <code>.striped</code> also affects the color of '
'the cards in their responsive view on mobile devices.</li>',
'<li>If you create a <code>.preset</code> table, which you do not '
'want to alter via Javascript to be responsive at any time in the '
'future, you can omit the <code>data-label</code> attributes.</li>']}
{'code': '&lt;span class="bordered"&gt;Bordered&lt;/span&gt;\r\n'
'&lt;span class="rounded"&gt;Rounded&lt;/span&gt;\r\n'
'&lt;span class="circular"&gt;Circular&lt;/span&gt;\r\n'
'&lt;span class="shadowed"&gt;Casts shadow&lt;/span&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">Use the <code>.bordered</code> class to apply a generic black border with 25% opacity to any element. Apart from that you can use the <code>.rounded</code> and <code>.circular</code> classes to create generic border radiuses. Finally, you can use the <code>.shadowed</code> class to add a generic <code><span class="fore-secondary">box-shadow</span></code> to any element.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;span class="rounded circular"&gt;Bad '
'radius&lt;/span&gt;\r\n'
'<span class="fore-secondary">&lt;!-- or --&gt;</span>\r\n'
'&lt;span class="shadow-small shadow-large"&gt;Bad '
'shadow&lt;/span&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid combining two classes of '
'the same type (i.e. two radii or two shadow styles), as they might '
'overwrite each other and cause unexpected behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;span class="bordered rounded shadow-small"&gt;Stylized '
'element&lt;/span&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can combine a generic border with '
'any border radius or shadow or even both.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br/>
<p>This is a paragraph with a piece of <span class="bordered">bordered text</span>.</p>
<button class="bordered">Bordered button</button><button class="bordered primary">Bordered button</button><br/>
<p><img alt="image" class="rounded" src="https://placehold.it/200x200?text=rounded"/>��<img alt="image" class="circular" src="https://placehold.it/200x200?text=circular"/></p><br/>
<p><span class="shadowed">This is an element that casts a shadow.</span></p><br/>
</div>
</div>,
'id': 'borders-shadows',
'module': 'utility',
'name': 'Generic borders & shadows',
'notes': ['<li>All of these classes utilize <code><span '
'class="fore-secondary">!important</span></code> declarations, so '
'be careful when and how to use them.</li>',
'<li>The <code>.bordered</code> class was originally created with '
'elements such as buttons in mind, to allow users highlighting '
'certain elements in their designs, without having to change any '
'default styles.</li>',
'<li>All of the above classes can be used with most modern HTML '
'elements.</li>']}
{'code': '&lt;ul class="breadcrumbs"&gt;\r\n'
' &lt;li&gt;&lt;a href="#"&gt;Root&lt;/a&gt;&lt;/li&gt;\r\n'
' &lt;li&gt;&lt;a href="#"&gt;Folder&lt;/a&gt;&lt;/li&gt;\r\n'
' &lt;li&gt;File&lt;/li&gt;\r\n'
'&lt;/ul&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p style="text-align:justify">Breadcrumbs are usually used to show the navigational hierarchy of pages or folders. To use them, simply create a <code>&lt;ul&gt;</code> element that implements the <code>.breadcrumbs</code> class. Inside this unordered list, add as many <code>&lt;li&gt;</code> elements as needed to show your hierarchy. You can add links to the list elements, as necessary.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;ol class="breadcrumbs"&gt;\r\n'
' &lt;li&gt;&lt;a href="#"&gt;Does&lt;/a&gt;&lt;/li&gt;\r\n'
' &lt;li&gt;&lt;a href="#"&gt;Not&lt;/a&gt;&lt;/li&gt;\r\n'
' &lt;li&gt;Work&lt;/li&gt;\r\n'
'&lt;/ol&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0The structure of the '
'breadcrumb component prohibits the use of <code>&lt;ol&gt;</code> '
'in place of the <code>&lt;ul&gt;</code> element.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;ul class="breadcrumbs"&gt;\r\n'
' &lt;li&gt;&lt;a href="#"&gt;Root&lt;/a&gt;\r\n'
' &lt;ul class="breadcrumbs"&gt;\r\n'
' &lt;li&gt;&lt;a href="#"&gt;Folder&lt;/a&gt;&lt;/li&gt;\r\n'
' &lt;/ul&gt;\r\n'
' &lt;/li&gt;\r\n'
' &lt;li&gt;File&lt;/li&gt;\r\n'
'&lt;/ul&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid nesting lists, '
'breadcrumbs or a combination of the two inside the '
'<code>.breadcrumbs</code> list, as this might cause unexpected '
'behavior.</p>\n'
'</div>'],
'dos': [],
'example': <div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div><br/>
<ul class="breadcrumbs"> <li><a href="#">Root</a></li> <li><a href="#">Folder</a></li> <li>File</li> </ul><br/>
</div>
</div>,
'id': 'breadcrumbs',
'module': 'utility',
'name': 'Breadcrumbs',
'notes': ['<li>The separators between breadcrumbs are added using some tricky '
'CSS rules. Due to that, there might be a few browser versions or '
'devices where you can see part of the seams between the element '
'separators.</li>',
'<li>Breadcrumbs show a hierarchy, an ordered list. However, we do '
'not use the <code>&lt;ol&gt;</code> element, as it might conflict '
"with some custom styles we've seen people use.</li>",
'<li>If you want to add some accesibility to your breadcrumbs, you '
'can add the <code><span class="fore-secondary">role</span>=<span '
'class="fore-primary">"<a '
'href="https://www.w3.org/TR/wai-aria/roles#navigation">navigation</a>"</span></code> '
'attribute, although it is not required.</li>']}
{'code': '&lt;span class="close"&gt;&lt;/span&gt;',
'desc': <div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p style="text-align:justify">To create a close icon, simply add an element implementing the <code>.close</code> class.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;div class="close"&gt;&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can use a handful of other HTML '
'elements instead of the <code>&lt;span&gt;</code> element showcased '
'in the example above, most commonly <code>&lt;div&gt;</code> '
'elements.</p>\n'
'</div>',
'<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;button class="close"&gt;&lt;/button&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0If you want your close icon to behave '
'like a button (i.e. register as a button on screen readers and have '
'the required logic attached to it), you can apply the '
'<code>.close</code> class to a <code>&lt;button&gt;</code> element '
'instead. You can even apply any of the button color variant '
'classes.</p>\n'
'</div>'],
'example': <div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br/>
<p style="text-align:center;">��<span class="close"></span>��</p>
<br/>
</div>
</div>,
'id': 'close-icon',
'module': 'utility',
'name': 'Close icon',
'notes': ['<li>The close icon behaves similar to a button when hovering over '
'it or otherwise focusing or selecting it.</li>']}
{'code': '&lt;div class="responsive-padding"&gt;Responsive '
'padding&lt;/div&gt;\r\n'
'&lt;div class="responsive-margin"&gt;Responsive margin&lt;/div&gt;',
'desc': <div class="col-sm-12 col-sm-first">
<p style="text-align:justify">Helper classes for the <code>padding</code> and <code>margin</code> attributes are provided in the form of <code>.responsive-margin</code> and <code>.responsive-padding</code> classes. Both of these classes are responsive, allowing you to collapse the spacing and size of elements on different displays to make better use of the device's viewport.</p>
<h3>Sample code</h3>
</div>,
'donts': [],
'dos': ['<div class="col-sm-12">\n'
'<pre>&lt;div class="responsive-padding '
'responsive-margin"&gt;Responsive padding and '
'margin&lt;/div&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can use both of these classes to '
'make certain element adapt to changes. This could be especially '
'useful for certain grid layouts.</p>\n'
'</div>'],
'example': '',
'id': 'responsive-sizing',
'module': 'utility',
'name': 'Responsive sizing & spacing classes',
'notes': ['<li>If the default values of these classes are not suited to your '
'needs, check out the <a href="customization">customization</a> '
'page.</li>',
'<li>Both classes utilize <code><span '
'class="fore-secondary">!important</span></code> declarations, so '
'be careful when and how to use them.</li>']}
{'code': '&lt;span class="hidden-sm"&gt;Hidden in smaller '
'screens&lt;/span&gt;\r\n'
'&lt;span class="hidden-md"&gt;Hidden in medium-sized '
'screens&lt;/span&gt;\r\n'
'&lt;span class="hidden-lg"&gt;Hidden in larger '
'screens&lt;/span&gt;\r\n'
'\r\n'
'&lt;span class="visually-hidden-sm"&gt;Visually hidden in smaller '
'screens&lt;/span&gt;\r\n'
'&lt;span class="visually-hidden-md"&gt;Visually hidden in '
'medium-sized screens&lt;/span&gt;\r\n'
'&lt;span class="visually-hidden-lg"&gt;Visually hidden in larger '
'screens&lt;/span&gt;',
'desc': <div class="col-sm-12 col-sm-first">
<p style="text-align:justify">You can hide content (either fully or only visually) for certain screens, using the responsive visibility helpers. To hide elements completely use the <code>.hidden-<span class="fore-primary">SCR_SZ</span></code> syntax, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens). If you want to hide certains elements for all users, except screen readers, replace <code>.hidden</code> with <code>.visually-hidden</code>, followed by the screen size name.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">\n'
'<pre>&lt;span class="hidden-sm visually-hidden-sm"&gt;Not a good '
'idea&lt;/span&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid combining responsive '
'visibility helpers for the same screen size. Combining both of '
'them might cause unexpected behavior.</p>\n'
'</div>'],
'dos': ['<div class="col-sm-12 col-md-6">\n'
'<pre>&lt;span class="hidden-sm hidden-md"&gt;Hidden in smaller and '
'medium-sized screens, visible in larger screens&lt;/span&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;span class="visually-hidden-md visually-hidden-lg"&gt;Visually '
'hidden in medium-sized and larger screens, visible in smaller '
'screens&lt;/span&gt;\r\n'
'<span class="fore-tertiary">&lt;!-- or --&gt;</span>\r\n'
'&lt;span class="hidden-sm visually-hidden-lg"&gt;Hidden in smaller '
'screens, visually hidden in larger screens, visible in medium-sized '
'screens&lt;/span&gt;</pre>\n'
'<p class="do" style="text-align:justify"><mark '
'class="tertiary">Do:</mark>\xa0You can combine responsive visibility '
'helpers for different sizes, based on your needs.</p>\n'
'</div>'],
'example': '',
'id': 'responsive-visibility',
'module': 'utility',
'name': 'Responsive visibility helpers',
'notes': ['<li>Responsive visibility helper classes utilize <code><span '
'class="fore-secondary">!important</span></code> declarations, so '
'be careful when and how to use them.</li>',
'<li>The specific breakpoints for small, medium and large screen '
'sizes are as follows:\n'
'<ul>\n'
'<li><strong>small</strong>: less than <code>768px</code> '
'wide</li>\n'
'<li><strong>medium</strong>: more than or equal to '
'<code>768px</code> wide but less than <code>1280px</code> '
'wide</li>\n'
'<li><strong>large</strong>: <code>1280px</code> wide or more</li>\n'
'</ul>\n'
'</li>',
'<li>Responsive visibility helper classes are independent, meaning '
'that hiding an element in one screen size will not affect it '
'visibility in any other screen size.</li>']}
{'code': '&lt;span class="hidden"&gt;Hidden text&lt;/span&gt;\r\n'
'&lt;span class="visually-hidden"&gt;Screen-reader-only '
'text&lt;/span&gt;',
'desc': <div class="col-sm-12 col-sm-first">
<p style="text-align:justify">You can hide content for all your users, using the default <code><span class="fore-secondary">hidden</span></code> attribute. However, we provide you with the <code>.hidden</code> class for the same purpose, as well as the <code>.visually-hidden</code> class which will make your content hidden, except for screen readers.</p>
<h3>Sample code</h3>
</div>,
'donts': ['<div class="col-sm-12">\n'
'<pre>&lt;span class="hidden visually-hidden"&gt;Not a good '
'idea&lt;/span&gt;</pre>\n'
'<p class="dont" style="text-align:justify"><mark '
'class="secondary">Don\'t:</mark>\xa0Avoid using both classes at '
'the same time. Instead, use <code>.hidden</code> to hide content '
'for all users, <code>.visually-hidden</code> to hide it for '
'non-screen-reader users or <code><span '
'class="fore-secondary">aria-hidden</span>=<span '
'class="fore-primary">"true"</span></code> to hide it for '
'screen-reader-only users.</p>\n'
'</div>'],
'dos': [],
'example': '',
'id': 'visibility-helpers',
'module': 'utility',
'name': 'Visibility helpers',
'notes': ['<li>Both classes utilize <code><span '
'class="fore-secondary">!important</span></code> declarations, so '
'be careful when and how to use them.</li>']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment