1069 lines
No EOL
216 KiB
HTML
1069 lines
No EOL
216 KiB
HTML
<!DOCTYPE html><html lang="en"><head>
|
|
<link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700|Poppins:400,400i,500,700,700i&subset=latin-ext" rel="stylesheet">
|
|
<link rel="stylesheet" href="./style.min.css">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.0.4/fuse.min.js"></script>
|
|
<title>mini.css - Docs</title>
|
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites.">
|
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, toolkit">
|
|
<meta name="author" content="Angelos Chalaris (chalarangelo)">
|
|
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
|
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
|
|
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.png">
|
|
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
|
|
</head><body><div id="root"><header class="row">
|
|
<span class="logo col-sm-3 col-md">mini.css</span>
|
|
<a class="button col-sm col-md" href="https://github.com/Chalarangelo/mini.css" target="_blank">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="height: 20px; vertical-align: text-top;"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>
|
|
<span> Github</span></a>
|
|
<a class="button col-sm col-md" href="#">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="height: 20px; vertical-align: text-top;"><path d="M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34"></path><polygon points="18 2 22 6 12 16 8 16 8 12 18 2"></polygon></svg>
|
|
<span> Flavors</span></a>
|
|
<label for="doc-drawer-checkbox" class="button drawer-toggle col-sm"></label>
|
|
</header>
|
|
<div class="row" id="doc-wrapper">
|
|
<input id="doc-drawer-checkbox" class="drawer" value="on" type="checkbox">
|
|
<nav class="col-md-4 col-lg-3" id="nav-drawer"><h3>Menu</h3><label for="doc-drawer-checkbox" class="button drawer-close"></label><div><input style="width: 100%; margin: 0px;" placeholder="Search..." type="search" id="search-bar" oninput="search()"></div><a href="#getting-started" id="link-to-getting-started">Getting started</a><a href="#common-textual-elements" id="link-to-common-textual-elements">Common textual elements</a><a href="#heading" id="link-to-heading">Headings</a><a href="#images-captions" id="link-to-images-captions">Images & captions</a><a href="#lists" id="link-to-lists">Lists</a><a href="#code-and-quotations" id="link-to-code-and-quotations">Code & quotations</a><a href="#grid" id="link-to-grid">Grid system</a><a href="#cards" id="link-to-cards">Cards</a><a href="#card-sections" id="link-to-card-sections">Card sections</a><a href="#forms-and-input" id="link-to-forms-and-input">Forms & input</a><a href="#buttons" id="link-to-buttons">Buttons</a><a href="#input-grouping" id="link-to-input-grouping">Input grouping</a><a href="#header" id="link-to-header">Header</a><a href="#navigation-bar" id="link-to-navigation-bar">Navigation bar</a><a href="#footer" id="link-to-footer">Footer</a><a href="#drawer" id="link-to-drawer">Menu drawer</a><a href="#tables" id="link-to-tables">Tables</a><a href="#text-highlighting" id="link-to-text-highlighting">Text highlighting</a><a href="#toasts" id="link-to-toasts">Toasts</a><a href="#tooltips" id="link-to-tooltips">Tooltips</a><a href="#modal-dialogs" id="link-to-modal-dialogs">Modal dialogs</a><a href="#spoilers-and-accordions" id="link-to-spoilers-and-accordions">Spoilers & accordions</a><a href="#progress-bars" id="link-to-progress-bars">Progress bars</a><a href="#donut-spinners" id="link-to-donut-spinners">Donut spinners</a><a href="#icons" id="link-to-icons">Icons</a><a href="#visibility-helpers" id="link-to-visibility-helpers">Visibility helpers</a><a href="#element-decorators" id="link-to-element-decorators">Element decorators</a><a href="#responsive-spacing-sizing" id="link-to-responsive-spacing-sizing">Responsive spacing & sizing</a><span id="no-results">No results found</span></nav>
|
|
<main class="col-sm-12 col-md-8 col-lg-9" id="doc-content"><div id="getting-started" class="card fluid">
|
|
<h2 class="section double-padded">Getting started</h2>
|
|
|
|
<div class="section"><p>You can get started using <strong>mini.css</strong> in one of many ways. It is published on <strong>npm</strong> and <strong>yarn</strong>, so you can easily download it, using your preferred package manager:</p>
|
|
<div class="row"><div class="col-sm-12 col-md"><pre>npm install mini.css</pre></div><div class="col-sm-12 col-md"><pre>yarn add mini.css</pre></div></div>
|
|
<br/><p>Alternatively, you can use either <strong>rawgit</strong> or <strong>cdnjs</strong> to import <strong>mini.css</strong> into your HTML page's <code><head></code> tag:</p>
|
|
<pre><link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v3.0.0-alpha.3/dist/mini-default.min.css"></pre>
|
|
<pre><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mini.css/v3.0.0-alpha.3/mini-default.min.css"></pre>
|
|
<br/><p>After adding <strong>mini.css</strong> to your project, remember to also add the following line inside your HTML page's <code><head></code> tag to utilize the viewport meta tag:</p>
|
|
<pre><meta name="viewport" content="width=device-width, initial-scale=1"></pre>
|
|
<br/><p><strong>mini.css</strong> is crafted with long-term support in mind, so expect it to be compatible with all modern browsers, as well as their future versions. However, most legacy and proxy browsers, such as Internet Explorer, Opera Mini, IE Mobile and UC Browser are not officially supported, meaning certain features may not be displayed properly or behave exactly as expected.</p><br/>
|
|
<figure class="container"><div class="row">
|
|
<div class="col-sm" style="text-align:center; background: #35BCE6; padding: 1rem;"><img src="browser-logos/edge_128x128.png" alt="edge"><br/><h3><small> Edge<sup style="-0.675em"><i class="fa fa-lg fa-exclamation" aria-hidden="true" style="font-size: 80%;"></i></sup></small>15</h3></div>
|
|
<div class="col-sm" style="text-align:center; background: #FF742E; padding: 1rem;"><img src="browser-logos/firefox_128x128.png" alt="firefox"><br/><h3><small> Firefox</small>35</h3></div>
|
|
<div class="col-sm" style="text-align:center; background: #FFE270; padding: 1rem;"><img src="browser-logos/chrome_128x128.png" alt="chrome"><br/><h3><small> Chrome</small>49</h3></div>
|
|
<div class="col-sm" style="text-align:center; background: #00D0FF; padding: 1rem;"><img src="browser-logos/safari_128x128.png" alt="safari"><br/><h3><small> Safari</small>9.1</h3></div>
|
|
<div class="col-sm" style="text-align:center; background: #FF6E6E; padding: 1rem;"><img src="browser-logos/opera_128x128.png" alt="opera"><br/><h3><small> Opera</small>36</h3></div>
|
|
<div class="col-sm" style="text-align:center; background: #0F98E0; padding: 1rem;"><img src="browser-logos/android_128x128.png" alt="android"><br/><h3><small> Android</small>56</h3></div>
|
|
</div><figcaption>Browser versions officially supported</figcaption></figure><br/></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><br/><div id="common-textual-elements" class="card fluid">
|
|
<h2 class="section double-padded">Common textual elements</h2>
|
|
|
|
<div class="section"><p><strong>mini.css</strong> utilizes the ruleset of <a href="http://necolas.github.io/normalize.css/" target="_blank">Normalize.css</a> v7.0.0 to reliably deal with inconsistencies between browsers, while applying some tasteful defaults on top, such as using <a href="https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/" target="_blank">native font stack</a> to figure out the best font for each device, setting the background and foreground colors, as well as the size of the text to <code>16px</code> and its line height to <code>1.5</code>.</p>
|
|
<p>All of the most common HTML5 elements, such as paragraphs, links, bold, small and slanted text, have been styled by default using clean, modern typography to make your pages look cool and stand out from the rest of the internet.</p></div>
|
|
<div class="section"><h3>Example</h3><p class="doc">This is a paragraph with some sample text. Did you know that the latest version of <strong class="doc">mini.css</strong> is codenamed <em class="doc">Gluon</em>? Well, now you do!</p><hr class="doc"/><p><small class="doc">Remember that <strong class="doc">mini.css</strong> is totally free, no fine print involved!</small></p></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><p></span>This is a paragraph. with some <span class="highlight-a"><strong></span>bold text<span class="highlight-a"></strong></span> and some <span class="highlight-a"><em></span>italics text<span class="highlight-a"></em></span>.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span><span class="highlight-a">></span>This is a link.<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"><small></span>This is some small text.<span class="highlight-a"></small></span></span>
|
|
<span class="code-line"><span class="highlight-a"><sub></span>Subscript<span class="highlight-a"></sub></span></span>
|
|
<span class="code-line"><span class="highlight-a"><sup></span>Superscript<span class="highlight-a"></sup></span></span>
|
|
<span class="code-line"><span class="highlight-a"><hr/></span></span></pre></div>
|
|
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-c">/* Do not do this (use Sass instead) */</span></span>
|
|
<span class="code-line"><span class="highlight-a">html</span> {</span>
|
|
<span class="code-line"> font-size: <span class="highlight-b">14px</span>;</span>
|
|
<span class="code-line">}</span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid altering the base font size of <code>16px</code> directly in your CSS code, as it can cause problems with the display of certain elements.</p></div></div></div>
|
|
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color can be changed globally by changing the value of the <code>--fore-color</code> variable.</li><li>Background color can be changed globally by changing the value of the <code>--back-color</code> variable.</li><li>Border color can be changed globally by changing the value of the <code>--border-color</code> variable. This affects the color of <code><hr></code> elements.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>You can change the color of links by changing the values of the <code>--a-link-color</code> and <code>--a-visited-color</code> variables.</li></ul></div>
|
|
</div><br/><div id="heading" class="card fluid">
|
|
<h2 class="section double-padded">Headings</h2>
|
|
|
|
<div class="section"><p>All of the HTML5 heading elements are styled, using a customizable ratio and simple rules, providing a clean base for your web app's titles. Apart from the headings themselves, customized rules are provided for displaying subheadings or explanatory text below your web app's headings.</p></div>
|
|
<div class="section"><h3>Example</h3><div class="row"><div class="col-sm-12 col-md-6 col-md-first"><h1 class="doc">Heading 1<small class="doc">Subheading</small></h1></div>
|
|
<div class="col-sm-12 col-md-6"><h2 class="doc">Heading 2<small class="doc">Subheading</small></h2></div>
|
|
<div class="col-sm-12 col-md-6 col-md-last"><h3 class="doc">Heading 3<small class="doc">Subheading</small></h3></div>
|
|
<div class="col-sm-12 col-md-6 col-md-first"><h4 class="doc">Heading 4<small class="doc">Subheading</small></h4></div>
|
|
<div class="col-sm-12 col-md-6"><h5 class="doc">Heading 5<small class="doc">Subheading</small></h5></div>
|
|
<div class="col-sm-12 col-md-6 col-md-last"><h6 class="doc">Heading 6<small class="doc">Subheading</small></h6></div></div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><h1></span>Heading 1 <span class="highlight-a"><small></span>Subheading<span class="highlight-a"></small></h1></span></span>
|
|
<span class="code-line"><span class="highlight-a"><h2></span>Heading 2 <span class="highlight-a"><small></span>Subheading<span class="highlight-a"></small></h2></span></span>
|
|
<span class="code-line"><span class="highlight-a"><h3></span>Heading 3 <span class="highlight-a"><small></span>Subheading<span class="highlight-a"></small></h3></span></span>
|
|
<span class="code-line"><span class="highlight-a"><h4></span>Heading 4 <span class="highlight-a"><small></span>Subheading<span class="highlight-a"></small></h4></span></span>
|
|
<span class="code-line"><span class="highlight-a"><h5></span>Heading 5 <span class="highlight-a"><small></span>Subheading<span class="highlight-a"></small></h5></span></span>
|
|
<span class="code-line"><span class="highlight-a"><h6></span>Heading 6 <span class="highlight-a"><small></span>Subheading<span class="highlight-a"></small></h6></span></span></pre>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color can be changed globally by changing the value of the <code>--fore-color</code> variable. This will affect the color of the headings' main text.</li><li>Secondary text color can be changed globally by changing the value of the <code>--secondary-fore-color</code> variable. This will affect the color of subheadings.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>You can change the ratio of headings' size by chaning the value of the <code>--heading-ratio</code> variable. Bear in mind that the value of this variable must be unitless to work properly.</li></ul></div>
|
|
</div><br/><div id="images-captions" class="card fluid">
|
|
<h2 class="section double-padded">Images & captions</h2>
|
|
|
|
<div class="section"><p>Image elements are responsive by default, automatically scaling down as necessary to display properly on smaller devices. Images retain their original aspect ratio and they will never scale above their original size.</p>
|
|
<p>If you want to add captions to images, you can use HTML5 figure elements, along with their related captions.</p></div>
|
|
<div class="section"><h3>Example</h3><figure><img src="https://placehold.it/800x600" alt="placeholder"><figcaption class="doc">Image caption</figcaption></figure></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><img</span> <span class="highlight-b">src</span>=<span class="highlight-c">"image.png"</span> <span class="highlight-b">alt</span>=<span class="highlight-c">"Image description"</span><span class="highlight-a">/></span></span></pre><pre><span class="code-line"><span class="highlight-a"><figure></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><img</span> <span class="highlight-b">src</span>=<span class="highlight-c">"image.png"</span> <span class="highlight-b">alt</span>=<span class="highlight-c">"Image description"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><figcaption></span>Image caption<span class="highlight-a"></figcaption></span></span>
|
|
<span class="code-line"><span class="highlight-a"></figure></span></span></pre></div>
|
|
|
|
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>While not mandatory, it is considered a good practice to always add a <code>alt</code> attribute to image elements on your web apps.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>You can change the text color of <code><figcaption></code> elements by changing the value of the <code>--secondary-fore-color</code> variable.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li></ul></div>
|
|
</div><br/><div id="lists" class="card fluid">
|
|
<h2 class="section double-padded">Lists</h2>
|
|
|
|
<div class="section"><p>List elements, both unordered and ordered, are minimally styled to match with the rest of the framework's aesthetics. Their margins and padding are reset to properly align with the rest of the common HTML5 elements, providing a stable foundation for all of your web app's lists.</p></div>
|
|
<div class="section"><h3>Example</h3><ul class="doc"><li class="doc">Apple</li><li class="doc">Orange</li><li class="doc">Strawberry</li></ul><br/>
|
|
<ol class="doc"><li class="doc">Wake up</li><li class="doc">Eat breakfast</li><li class="doc">Go to work</li></ol></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><ul></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><li></span>Apple<span class="highlight-a"></li></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><li></span>Orange<span class="highlight-a"></li></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><li></span>Strawberry<span class="highlight-a"></li></span></span>
|
|
<span class="code-line"><span class="highlight-a"></ul></span></span>
|
|
<span class="code-line"><span class="highlight-a"><ol></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><li></span>Wake up<span class="highlight-a"></li></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><li></span>Eat breakfast<span class="highlight-a"></li></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><li></span>Go to work<span class="highlight-a"></li></span></span>
|
|
<span class="code-line"><span class="highlight-a"></ol></span></span></pre></div>
|
|
|
|
|
|
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color can be changed globally by changing the value of the <code>--fore-color</code> variable.</li><li>Background color can be changed globally by changing the value of the <code>--back-color</code> variable.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li></ul></div>
|
|
</div><br/><div id="code-and-quotations" class="card fluid">
|
|
<h2 class="section double-padded">Code & quotations</h2>
|
|
|
|
<div class="section"><p>Code blocks and quotation elements are styled using custom rules that help make them stand out from the rest of the text, while inline code and keyboard input tags are minimally styled, aiming not to break the flow of regular text.</p></div>
|
|
<div class="section"><h3>Example</h3><p class="doc">This is some text with some inline <code class="doc">source code</code> and some keyboard <kbd class="doc">input</kbd>.</p>
|
|
<pre class="doc">function sum(num1, num2){
|
|
return num1 + num2;
|
|
}</pre>
|
|
<blockquote cite="www.quotation.source" class="doc">This is some text quoted from elsewhere.</blockquote></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><p></span>This is some text with some inline <span class="highlight-a"><code></span>source code<span class="highlight-a"></code></span> and some keyboard <span class="highlight-a"><kbd></span>input<span class="highlight-a"></kbd></span>.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><pre></span>function sum(num1, num2){</span>
|
|
<span class="code-line"> return num1 + num2;</span>
|
|
<span class="code-line">}<span class="highlight-a"></pre></span></span>
|
|
<span class="code-line"><span class="highlight-a"><blockquote</span> <span class="highlight-b">cite</span>=<span class="highlight-c">"www.quotation.source"</span><span class="highlight-a">></span>This is some text quoted from elsewhere.<span class="highlight-a"></blockquote></span></span></pre></div>
|
|
|
|
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>The <code>cite</code> attribute of <code><blockquote></code> elements is not mandatory and can be omitted. The element's sizing will be automatically adjusted according to the presence of the <code>cite</code> attribute.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color can be changed globally by changing the value of the <code>--fore-color</code> variable. This will affect the text color of <code><code></code> and <code><pre></code> elements and background color of <code><kbd></code> elements.</li><li>Background color can be changed globally by changing the value of the <code>--back-color</code> variable. This will affect the background color of <code><blockquote></code> elements and text color of <code><kbd></code>.</li><li>You can change the background color of <code><code></code> and <code><pre></code> elements by changing the value of the <code>--secondary-back-color</code> variable.</li><li>You can change the text color of <code><blockquote></code> elements by changing the value of the <code>--secondary-fore-color</code> variable.</li><li>You can change the border color of <code><pre></code> and <code><blockquote></code> elements by changing the value of the <code>--secondary-border-color</code> variable.</li><li>You can change the border color of the left border of <code><pre></code> elements by changing the value of the <code>--pre-color</code> variable.</li><li>You can change the border color of the left border of <code><blockquote></code> elements by changing the value of the <code>--blockquote-color</code> variable.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="grid" class="card fluid">
|
|
<h2 class="section double-padded">Grid system</h2>
|
|
|
|
<div class="section"><p>The grid system of <strong>mini.css</strong> utilizes the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="_blank">Flexbox layout</a> to provide you with a simple, modern, responsive layout system for your web apps. Like most modern CSS frameworks' grid systems, it is composed of three main components - containers, rows and columns:</p>
|
|
<ul><li>The container (<code>.container</code>) is the outermost layer of the grid system and serves as a fluid wrapper, which can be used as the basis for your layout.</li>
|
|
<li>Inside the container, you can add one or more rows (<code>.row</code>), which will in turn house the columns.</li>
|
|
<li>Columns (<code>col-*-*</code>) are placed inside rows and they can be customized to display differently on different screen sizes, make use of fluid layouts, use offsets or change ordering.</li></ul></div>
|
|
<div class="section"><h3>Example</h3><div class="container" style="padding: 0.25rem">
|
|
<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>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3>
|
|
<pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"container"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-1"</span><span class="highlight-a">></span><span class="highlight-a"></div></span> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-11"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-2"</span><span class="highlight-a">></span><span class="highlight-a"></div></span> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-10"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-3"</span><span class="highlight-a">></span><span class="highlight-a"></div></span> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-9"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-4"</span><span class="highlight-a">></span><span class="highlight-a"></div></span> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-8"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-5"</span><span class="highlight-a">></span><span class="highlight-a"></div></span> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-7"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-6"</span><span class="highlight-a">></span><span class="highlight-a"></div></span> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-6"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></span><span class="highlight-a"></div></span> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre>
|
|
<p>You can use the grid system to create a responsive <a href="https://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/" target="_blank">media object</a> in one of many ways. Below is a simple example of a two-column media object with an image and some text:
|
|
<pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-2"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><img</span> <span class="highlight-b">src</span>=<span class="highlight-c">"image.png"</span> <span class="highlight-b">alt</span>=<span class="highlight-c">"Image description"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><h2></span>Media object heading<span class="highlight-a"></h2></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>Media object content...<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Screen sizes and width</h4><p>Each column class is defined by specifying a screen size (small - <code>sm</code>, medium - <code>md</code> or large - <code>lg</code>) and a column width (a value between <code>1</code> and <code>12</code> or you can omit it for a fluid column), separated by dashes (e.g. <code>.col-sm-6</code> for a 6-wide column on a small screen). Using these you can apply different layouts for different screen sizes, by altering the width of columns, using multiple classes. Note that column widths are applied recursively, meaning that if you do not specify a width for a specific screen size the column will use the width applied for the previous largest screen size.</p><h5>Example</h5><div class="container" style="padding: 0.25rem">
|
|
<div class="row">
|
|
<div class="col-sm-12 col-md">
|
|
<div class="row"><div class="col-sm"><h6 style="text-align:center">Small screen layout</h6></div></div>
|
|
<div class="row"><div class="col-sm"><div class="box-colored">sm-12</div></div></div>
|
|
<div class="row"><div class="col-sm-12"><div class="box-colored" style="height: 3.75rem">sm-12 md-8</div></div><div class="col-sm-12"><div class="box-colored" style="height: 2rem">sm-12 md-4</div></div></div>
|
|
<div class="row"><div class="col-sm"><div class="box-colored">sm-12</div></div></div>
|
|
</div>
|
|
<div class="col-sm-12 col-md">
|
|
<div class="row"><div class="col-sm"><h6 style="text-align:center">Medium/Large screen layout</h6></div></div>
|
|
<div class="row"><div class="col-sm"><div class="box-colored">sm-12</div></div></div>
|
|
<div class="row"><div class="col-sm-8"><div class="box-colored" style="height: 8rem">sm-12 md-8</div></div><div class="col-sm-4"><div class="box-colored" style="height: 8rem">sm-12 md-4</div></div></div>
|
|
<div class="row"><div class="col-sm"><div class="box-colored">sm-12</div></div></div>
|
|
</div>
|
|
</div>
|
|
</div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"container"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-3 col-lg-2"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-5 col-lg-7"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-4 col-lg-3"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span>></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm col-lg-10"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-4 col-md"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><br/><h4>Predefined layouts</h4><p>Rows can be modified to apply predefined layouts to the columns inside them, effectively reducing the amount of work required for simple layouts. To create a predefined layout, you can add a class to a row (<code>.cols-*-*</code>), specifying a screen size and width for the columns inside it (or omitting the width for fluid columns), similarly to the way columns are defined (e.g. <code>.row.cols-sm-6</code> will cause all elements inside the row to be 6-wide on a small screen). Columns inside a predefined layout do not require any further classes to display and, much like normal column layouts, their widths are applied recursively.</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row cols-sm-6"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This paragraph is inside a 6-wide column.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This paragraph is inside a 6-wide column.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><br/><h4>Column offsets</h4><p>Columns can be moved to the right, by applying offset classes (<code>.col-*-offset-*</code>), defining a screen size and an offset (a value between <code>0</code> and <code>11</code>, e.g. <code>.col-sm-offset-3</code> will move a column 25% to the right on a small screen). Like all other column modifiers, offsets are applied recursively.</p><h5>Example</h5><div class="container" style="padding: 0.25rem">
|
|
<div class="row"><div class="col-sm col-sm-offset-11"><div class="box-colored">11</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-10"><div class="box-colored">10</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-9"><div class="box-colored">9</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-8"><div class="box-colored">8</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-7"><div class="box-colored">7</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-6"><div class="box-colored">6</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-5"><div class="box-colored">5</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-4"><div class="box-colored">4</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-3"><div class="box-colored">3</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-2"><div class="box-colored">2</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-1"><div class="box-colored">1</div></div></div>
|
|
<div class="row"><div class="col-sm col-sm-offset-0"><div class="box-colored">0</div></div></div>
|
|
</div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-8 col-sm-offset-2 col-md-offset-1 col-lg-offset-0"</span><span class="highlight-a">></div></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm col-sm-offset-3 col-md-offset-4 col-lg-offset-0"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-4 col-md-offset-5"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><br/><h4>Column reordering</h4><p>Columns can be reordered on different screen sizes, by applying a reordering class (<code>.col-*-*</code>), defining a screen size and the order (first, normal or last, e.g. <code>.col-sm-last</code> will move a column to the end of its row on a small screen). Like all other column modifiers, reordering is applied recursively.</p><h5>Example</h5><div class="container" style="padding: 0.25rem">
|
|
<div class="row">
|
|
<div class="col-sm-12 col-md">
|
|
<div class="row"><div class="col-sm"><h6 style="text-align:center">Small screen layout</h6></div></div>
|
|
<div class="row"><div class="col-sm-4"><div class="box-colored">md-last</div></div><div class="col-sm-4"><div class="box-colored"> </div></div><div class="col-sm-4"><div class="box-colored">md-first</div></div></div>
|
|
</div>
|
|
<div class="col-sm-12 col-md">
|
|
<div class="row"><div class="col-sm"><h6 style="text-align:center">Medium/Large screen layout</h6></div></div>
|
|
<div class="row"><div class="col-sm-4"><div class="box-colored">md-first</div></div><div class="col-sm-4"><div class="box-colored"> </div></div><div class="col-sm-4"><div class="box-colored">md-last</div></div></div>
|
|
</div>
|
|
</div>
|
|
</div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm col-md-last col-lg-normal"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm col-sm-first col-md-last"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm col-md-first col-lg-normal"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-3"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"container"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-3"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-3 row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-6"</span><span class="highlight-a">></div> <div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-6"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> A column can contain a container or a row inside it, or even be a row at the same time. In the latter case, it will act as a column for its parent row and as a row for its children.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></div> <div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-4"</span><span class="highlight-a">></span><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns whose total width exceeds <code>12</code> (100%). The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-6"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-6"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can change the layout of your content for different displays, laying out your content vertically on smaller screens or horizontally on larger screens. If your columns exceed a total width of <code>12</code> (100%) on some displays, they will wrap accordingly.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm col-lg-3 col-md-last"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-6 col-md-offset-2"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You do not need to specify a column's width or reapply offset and reordering modifiers if they are the same as the previous screen size.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row cols-sm-12 cols-md-6"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></div></span> <span class="highlight-a"><div></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-8 col-sm-offset-1 col-md-offset-0"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-last col-md-normal"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can set its offset to <code>0</code> for a specific screen size. Similarly, to remove previously applied reordering modifiers from a column, you can set its order to <code>normal</code>.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid placing a column directly inside another column. Always use a row to wrap columns, instead.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"container"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>Do not do this.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>Do not do this.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid layout.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-md"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row cols-md"</span><span class="highlight-a">></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Never omit the class that specifies a column's width for the small screen size. You can omit all other classes and modifiers, except for this. This also applies to predefined layouts.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row cols-sm-6"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row cols-sm-4"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid combining normal column width modifiers with predefined layouts, as the predefined layout will most likely override the width modifier of the column.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li><strong>mini.css</strong> uses a mobile-first approach in its grid system, so you do not have to rewrite the same layout for all three screen sizes. Leaving a column's size, offset or order unspecified for a screen size will use the style applied for the previous largest screen size recursively. This also applies to predefined layouts.</li><li>The specific breakpoints for small, medium and large screen sizes are as follows:
|
|
<ul>
|
|
<li>small: less than <code>768px</code> wide</li>
|
|
<li>medium: more than or equal to <code>768px</code> wide and less than <code>1280px</code> wide</li>
|
|
<li>large: <code>1280px</code> wide or more</li>
|
|
</ul></li><li>In many cases, you can omit the container and just use rows and columns. You only need to make sure that all of your rows have the same parent element.</li><li>You can use fluid columns to create columns whose width is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).</li><li>Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.</li><li>You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable. This only affects the padding of the container.</li></ul></div>
|
|
</div><br/><div id="cards" class="card fluid">
|
|
<h2 class="section double-padded">Cards</h2>
|
|
|
|
<div class="section"><p><strong>mini.css</strong> provides you with cards (<code>.card</code>), general-purpose containers that help you organize the content of your web apps. Cards should be used in combination with the <a href="#grid">grid system</a>, meaning that they need to be placed inside a grid's rows to work properly. Layouts created with cards are responsive, realigning according to the available size on the screen.</p></div>
|
|
<div class="section"><h3>Example</h3><div class="container" style="padding: 0.25rem"><div class="row">
|
|
<div class="card"><div class="section"><h3 class="doc">Card 1</h3><p class="doc">This is a basic card with some sample content.</p></div></div>
|
|
<div class="card"><div class="section"><h3 class="doc">Card 2</h3><p class="doc">This is another card with some sample content.</p></div></div>
|
|
<div class="card"><div class="section"><h3 class="doc">Card 3</h3><p class="doc">This is one more card with some sample content.</p></div></div>
|
|
</div></div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Alternative sizes</h4><p>You can create small (<code>.small</code>, <code>240px</code> wide) or large (<code>.large</code>, <code>480px</code> wide) cards by applying the appropriate modifiers to a card. Apart from that, you can also create fluid (<code>.fluid</code>) cards, that take up as much space as is available, however you will have to place these cards inside a grid layout's columns, effectively adding one extra step for them to display properly.</p><h5>Example</h5><div class="container" style="padding: 0.25rem"><div class="row">
|
|
<div class="card small"><div class="section"><h3 class="doc">Small Card</h3><p class="doc">Small cards are <code>240px</code> wide.</p></div></div>
|
|
<div class="card large"><div class="section"><h3 class="doc">Large Card</h3><p class="doc">Large cards are <code>480px</code> wide.</p></div></div>
|
|
<div class="col-sm-12 col-md-10 col-lg-8">
|
|
<div class="card fluid" style="margin: 0.5rem 0.25rem;"><div class="section"><h3 class="doc">Fluid Card</h3><p class="doc">Fluid cards scale their width based on the column that contains them.</p></div></div>
|
|
</div></div></div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card small"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card large"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card fluid"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><br/><h4>Color variants</h4><p>You can display warning (<code>.warning</code>) or error (<code>.error</code>) messages using cards, simply by adding the appropriate color modifiers to a card.</p><h5>Example</h5><div class="container" style="padding: 0.25rem"><div class="row">
|
|
<div class="card warning"><div class="section"><h3 class="doc">Warning Card</h3><p class="doc">Warning cards are used to display important information to users.</p></div></div>
|
|
<div class="card error"><div class="section"><h3 class="doc">Error Card</h3><p class="doc">Error cards are used to display error messages to users.</p></div></div>
|
|
</div></div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card warning"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card error"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can create rows inside a card, which can in turn contain other cards.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card row"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card col-sm"</span><span class="highlight-a">></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> An element cannot be a card and a row or column at the same time.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Never forget to wrap your cards inside a row and your fluid cards inside a row and a column.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card fluid"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Try not to combine fixed-width and fluid cards. Instead, combine fixed-width cards with columns and place fluid cards inside them.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card warning error"</span><span class="highlight-a">></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid applying two color modifiers on the same card.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Due to the fact that fluid cards stretch to fill their parent container, they might not fully respect their margins sometimes, although this should not cause any noticable problems in your web apps' layouts.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for cards can be changed by changing the value of the <code>--card-fore-color</code> variable.</li><li>Background color for cards can be changed by changing the value of the <code>--card-back-color</code> variable.</li><li>Border color for cards can be changed by changing the value of the <code>--card-border-color</code> variable.</li><li>You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="card-sections" class="card fluid">
|
|
<h2 class="section double-padded">Card sections</h2>
|
|
|
|
<div class="section"><p>Card content is usually organized in smaller sections (<code>.section</code>) to be more easily digestible. A card section can be any valid HTML5 element with the appropriate class applied to it.</p></div>
|
|
<div class="section"><h3>Example</h3><div class="container" style="padding: 0.25rem"><div class="row"><div class="col-sm-12">
|
|
<div class="card fluid" style="margin: 0.5rem 0.25rem"><h3 class="doc section">Title section</h3><p class="doc section">This is a section with some textual content.</p></div>
|
|
</div></div></div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Media sections</h4><p>You can create sections for media (<code>.media</code>), such as images or videos (using an <code><img></code> or a <code><iframe></code> element respectively). These sections are styled appropriately for presentation of media content, meaning that the content will scale appropriately to fill up the available space.</p><h5>Example</h5><div class="container" style="padding: 0.25rem;"><div class="row">
|
|
<div class="card"><div class="section"><h3 class="doc">Card with image</h3></div><img class="section media" src="https://placehold.it/800x600" alt="placeholder"></div>
|
|
<div class="card"><div class="section"><h3 class="doc">Card with video</h3></div><iframe class="section media" width="1280" height="720" src="https://www.youtube.com/embed/ScMzIvxBSi4"></iframe></div>
|
|
</div></div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><img</span> <span class="highlight-b">src</span>=<span class="highlight-c">"image.png"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section media"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><br/><h4>Color variants</h4><p>You can create sections with a darker (<code>.dark</code>) background, by applying the appropriate modifier.</p><h5>Example</h5><div class="container" style="padding: 0.25rem;"><div class="row">
|
|
<div class="card"><div class="section"><h3 class="doc">Normal section</h3></div><div class="section dark"><h3 class="doc">Dark section</h3></div></div>
|
|
</div></div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section dark"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><br/><h4>Additional spacing</h4><p>You can create sections with additional spacing (<code>.double-padded</code>), by applying the appropriate modifier.</p><h5>Example</h5><div class="container" style="padding: 0.25rem;"><div class="row">
|
|
<div class="card"><div class="section"><h3 class="doc">Normal spacing</h3></div><div class="section double-padded"><h3 class="doc">Additional spacing</h3></div></div>
|
|
</div></div><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section double-padded"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This should have been a section!<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid mixing regular content with content in sections. Instead, wrap all of your card's contents in sections.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>While not mandatory, it is highly suggested that you wrap all of your cards' contents in one or more sections.</li><li>Remember that a section can be any valid HTML5 element, so you can apply them to headings, paragraphs, input elements etc.</li><li>Media sections have a default height of <code>200px</code>.</li><li>Due to the media sections using <a href="http://caniuse.com/#feat=object-fit" target="_blank"><code>object-fit</code></a>, you might want to use a polyfill for better browser support (recommended: <a href="https://github.com/bfred-it/object-fit-images" target="_blank">image polyfill</a>, <a href="https://github.com/jonathantneal/fitie" target="_blank">video polyfill</a>).</li><li>Depending on the source website, some embedded videos might not display properly as media sections.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for cards and card sections can be changed by changing the value of the <code>--card-fore-color</code> variable.</li><li>Background color for cards and card sections can be changed by changing the value of the <code>--card-back-color</code> variable.</li><li>Border color for cards and card sections can be changed by changing the value of the <code>--card-border-color</code> variable.</li><li>You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li></ul></div>
|
|
</div><br/><div id="forms-and-input" class="card fluid">
|
|
<h2 class="section double-padded">Forms & input</h2>
|
|
|
|
<div class="section"><p>Forms, labels and common HTML5 input elements have been styled using clean, modern rules, improving the accessibility and usability of your web apps' forms.</p></div>
|
|
<div class="section"><h3>Example</h3><form><fieldset><legend class="doc">Sample form</legend>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-text" class="doc">Text</label></div>
|
|
<div class="col-sm-12 col-md"><input type="text" placeholder="Text" id="sf1-text" style="width:85%;" class="doc"></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-pwd" class="doc">Password</label></div>
|
|
<div class="col-sm-12 col-md"><input type="password" placeholder="Password" id="sf1-pwd" style="width:85%;" class="doc"></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-num" class="doc">Number</label></div>
|
|
<div class="col-sm-12 col-md"><input type="number" value="42" id="sf1-num" style="width:85%;" class="doc"></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-select" class="doc">Select</label></div>
|
|
<div class="col-sm-12 col-md"><select id="sf1-select" style="width:85%;" class="doc"><option class="doc">Apples</option><option class="doc">Oranges</option></select></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-check" class="doc">Checkbox</label></div>
|
|
<div class="col-sm-12 col-md"><input type="checkbox" autocomplete="off" id="sf1-check" class="doc"></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-radio" class="doc">Radio</label></div>
|
|
<div class="col-sm-12 col-md"><input type="radio" autocomplete="off" id="sf1-radio" class="doc"></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-textarea" class="doc">Textarea</label></div>
|
|
<div class="col-sm-12 col-md"><textarea class="doc" style="width:85%;" placeholder="Textarea"></textarea></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-invalid" class="doc">Invalid</label></div>
|
|
<div class="col-sm-12 col-md"><input value="Invalid" id="sf1-invalid" style="width:85%;" class="doc"></div>
|
|
<script>document.getElementById("sf1-invalid").setCustomValidity("This field is invalid");</script></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-disabled" class="doc">Disabled</label></div>
|
|
<div class="col-sm-12 col-md"><input disabled value="Disabled" id="sf1-disabled" style="width:85%;" class="doc"></div></div>
|
|
<div class="row responsive-label"><div class="col-sm-12 col-md-3"><label for="sf1-readonly" class="doc">Readonly</label></div>
|
|
<div class="col-sm-12 col-md"><input readonly value="Readonly" id="sf1-readonly" style="width:85%;" class="doc"></div></div>
|
|
</fieldset></form></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><form></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><fieldset></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><legend></span>Simple form<span class="highlight-a"></legend></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"username"</span><span class="highlight-a">></span>Username<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"text"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"Username"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Username"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"password"</span><span class="highlight-a">></span>Password<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"password"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"password"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Password"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></fieldset></span></span>
|
|
<span class="code-line"><span class="highlight-a"></form></span></span></pre></div>
|
|
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><form></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><fieldset></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><legend></span>Simple form<span class="highlight-a"></legend></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-6"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"username"</span><span class="highlight-a">></span>Username<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"text"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"Username"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Username"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-6"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"password"</span><span class="highlight-a">></span>Password<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"password"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"password"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Password"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></fieldset></span></span>
|
|
<span class="code-line"><span class="highlight-a"></form></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> Form inputs are inline by defaut, however you can combine forms with the <a href="#grid">grid system</a> to create aligned forms.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Using the <code><fieldset></code> and <code><legend></code> elements is highly recommended, as it improves semantic markup and accessibility.</li><li>Some input elements, such as date & 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 web app.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for forms and legend elements can be changed by changing the value of the <code>--form-fore-color</code> variable.</li><li>Background color for forms can be changed by changing the value of the <code>--form-back-color</code> variable.</li><li>Border color for forms and fieldset elements can be changed by changing the value of the <code>--form-border-color</code> variable.</li><li>Text color for input elements can be changed by changing the value of the <code>--input-fore-color</code> variable.</li><li>Background color for input elements can be changed by changing the value of the <code>--input-back-color</code> variable.</li><li>Border color for input elements can be changed by changing the value of the <code>--input-border-color</code> variable.</li><li>Border color for focused and invalid input elements can be changed by changing the value of the <code>--input-focus-color</code> and <code>--input-invalid-color</code> variables respectively.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="buttons" class="card fluid">
|
|
<h2 class="section double-padded">Buttons</h2>
|
|
|
|
<div class="section"><p>Buttons and button-like input elements have been styled by default to be consistent across browsers. You can also style other elements, such as links or form labels, to look like buttons, using the appropriate class (<code>.button</code>) or the <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role" target="_blank">button</a> role.</p></div>
|
|
<div class="section"><h3>Example</h3><button class="doc">Button</button><a href="#" class="button doc">Link</a><label class="button doc">Label</label><button disabled class="doc">Disabled</button></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><button></span>Button<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"button"</span> <span class="highlight-b">value</span>=<span class="highlight-c">"Button"</span><span class="highlight-a"> /></span></span>
|
|
<span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"reset"</span> <span class="highlight-b">value</span>=<span class="highlight-c">"Button"</span><span class="highlight-a"> /></span></span>
|
|
<span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"submit"</span> <span class="highlight-b">value</span>=<span class="highlight-c">"Button"</span><span class="highlight-a"> /></span></span>
|
|
<span class="code-line"><span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"button"</span><span class="highlight-a">></span>Link<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">role</span>=<span class="highlight-c">"button"</span><span class="highlight-a">></span>Link<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"><label</span> <span class="highlight-b">class</span>=<span class="highlight-c">"button"</span><span class="highlight-a">></span>Label<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"><span class="highlight-a"><label</span> <span class="highlight-b">role</span>=<span class="highlight-c">"button"</span><span class="highlight-a">></span>Label<span class="highlight-a"></label></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Color variants</h4><p>To make your buttons stand out, you can give them a primary (<code>.primary</code>), secondary (<code>.secondary</code>), tertiary (<code>.tertiary</code>) or inversed (<code>.inverse</code>) color palette.</p><h5>Example</h5><button class="primary doc">Primary</button><button class="secondary doc">Secondary</button><button class="tertiary doc">Tertiary</button><button class="inverse doc">Inverse</button><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"primary"</span><span class="highlight-a">></span>Primary<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"secondary"</span><span class="highlight-a">></span>Secondary<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"tertiary"</span><span class="highlight-a">></span>Tertiary<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"inverse"</span><span class="highlight-a">></span>Inverse<span class="highlight-a"></button></span></span></pre><br/><h4>Size variants</h4><p>You can make buttons smaller (<code>.small</code>) or larger (<code>.large</code>), by applying the appropriate modifier.</p><h5>Example</h5><button class="small doc">Small</button><button class="large doc">Large</button><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"small"</span><span class="highlight-a">></span>Small<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"large"</span><span class="highlight-a">></span>Large<span class="highlight-a"></button></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"file"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"file-input"</span> <span class="highlight-b">style</span>=<span class="highlight-c">"display:none"</span><span class="highlight-a"> /></span></span>
|
|
<span class="code-line"><span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"file-input"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"button"</span><span class="highlight-a">></span>Upload file<span class="highlight-a"></label></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> File upload inputs are not styled by default, due to inconsistencies in how browsers handle them. If you want them to look like other buttons, you can hide them and use a linked label.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"primary inverse"</span><span class="highlight-a">></span>Button<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"><button</span> <span class="highlight-b">class</span>=<span class="highlight-c">"small large"</span><span class="highlight-a">></span>Button<span class="highlight-a"></button></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid applying multiple modifiers of the same type on the same button.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>It is recommended to use the button role instead of the provided class, if you want your custom buttons to be fully accessible.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for buttons can be changed by changing the value of the <code>--button-fore-color</code> variable.</li><li>Background color for buttons can be changed by changing the value of the <code>--button-back-color</code> variable.</li><li>Border color for buttons can be changed by changing the value of the <code>--button-border-color</code> variable.</li><li>Background and border color for focused buttons can be changed by changing the values of the <code>--button-hover-back-color</code> and <code>--button-hover-border-color</code> variables respectively.</li><li>You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="input-grouping" class="card fluid">
|
|
<h2 class="section double-padded">Input grouping</h2>
|
|
|
|
<div class="section"><p>You can ensure that input elements and labels display together on the same line, by grouping them together (<code>.input-group</code>). You can also group buttons together, using a different grouping class (<code>.button-group</code>).</p></div>
|
|
<div class="section"><h3>Example</h3><form>
|
|
<fieldset>
|
|
<legend class="doc">Grouped inputs</legend>
|
|
<div class="input-group"><label for="gi1-un" class="doc">Username</label> <input type="email" value="" id="gi1-un" placeholder="Username" class="doc"></div><br/>
|
|
<div class="input-group"><label for="gi1-pwd" class="doc">Password</label> <input type="password" value="" id="gi1-pwd" placeholder="Password" class="doc"></div>
|
|
</fieldset>
|
|
</form>
|
|
<div class="button-group"><button class="doc">Buttons</button><button class="doc">can be</button><button class="doc">grouped</button></div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"input-group"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"username"</span><span class="highlight-a">></span>Username<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"text"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"Username"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Username"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"button-group"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><button></span>Button<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><button></span>Button<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><button></span>Button<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Fluid & vertical grouping</h4><p>You can make your input groups fluid (<code>.fluid</code>) or vertical (<code>.vertical</code>), by applying the appropriate modifiers.</p><h5>Example</h5><form>
|
|
<fieldset>
|
|
<legend class="doc">Fluid input groups</legend>
|
|
<div class="input-group fluid"><label for="gi2-un" class="doc">Username</label> <input type="email" value="" id="gi2-un" placeholder="Username" class="doc"></div>
|
|
<div class="input-group fluid"><label for="gi2-pwd" class="doc">Password</label> <input type="password" value="" id="gi2-pwd" placeholder="Password" class="doc"></div>
|
|
</fieldset>
|
|
</form>
|
|
<form>
|
|
<fieldset>
|
|
<legend class="doc">Vertical input groups</legend>
|
|
<div class="input-group vertical"><label for="gi3-un" class="doc">Username</label> <input type="email" value="" id="gi3-un" placeholder="Username" class="doc"></div>
|
|
<div class="input-group vertical"><label for="gi3-pwd" class="doc">Password</label> <input type="password" value="" id="gi3-pwd" placeholder="Password" class="doc"></div>
|
|
</fieldset>
|
|
</form><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"input-group fluid"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"username"</span><span class="highlight-a">></span>Username<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"text"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"Username"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Username"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"input-group vertical"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"username"</span><span class="highlight-a">></span>Username<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"text"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"Username"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Username"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"input-group row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"username"</span><span class="highlight-a">></span>Username<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"text"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"Username"</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">"Username"</span><span class="highlight-a">/></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid combining input groups with the <a href="#grid">grid system</a>, as there might be overlapping styles.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>It is highly recommended that you do not place checkboxes or radio buttons inside fluid or vertical input groups.</li><li>Button groups will display horizontally on medium and large screens, but collapse into a vertical view on small screens.</li></ul></div>
|
|
|
|
</div><br/><div id="header" class="card fluid">
|
|
<h2 class="section double-padded">Header</h2>
|
|
|
|
<div class="section"><p>The header element has been minimally styled, allowing you to create modern headers for your web apps. A header can include a logo element (<code>.logo</code>), as well as buttons, links and labels, styled as buttons (<code>.button</code>).</p></div>
|
|
<div class="section"><h3>Example</h3><header>
|
|
<a href="#" class="logo" class="doc">Logo</a> <button class="doc">Home</button>
|
|
<a href="#" class="button doc">News</a>
|
|
<button class="doc">About</button> <button class="doc">Contact</button>
|
|
</header></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><header></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"logo"</span><span class="highlight-a">></span>Logo<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"button"</span><span class="highlight-a">></span>Home<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><button></span>Download<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"></header></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Sticky header</h4><p>You can make your web app's header sticky (<code>.sticky</code>), by applying the appropriate modifier.</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><header</span> <span class="highlight-b">class</span>=<span class="highlight-c">"sticky"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"logo"</span><span class="highlight-a">></span>Logo<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"button"</span><span class="highlight-a">></span>Home<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><button></span>Download<span class="highlight-a"></button></span></span>
|
|
<span class="code-line"><span class="highlight-a"></header></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><header></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"button logo"</span><span class="highlight-a">></span>Logo<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span><span class="highlight-a">></span>Home<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"></header></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> You should not apply a <code>.button</code> class to the logo of your header, but you must make sure that all other elements inside the header are styled as buttons.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>The header element is partially responsive on smaller screens, displaying a scrollbar indicating that there is more content off-screen.</li><li>The header element can be a row in a <a href="grid">grid system</a>, allowing you to create responsive headers.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for the header can be changed by changing the value of the <code>--header-fore-color</code> variable.</li><li>Background color for the header can be changed by changing the value of the <code>--header-back-color</code> variable.</li><li>Border color for the header can be changed by changing the value of the <code>--header-border-color</code> variable.</li><li>Background color for focused buttons inside the header can be changed by changing the value of the <code>--header-hover-back-color</code> variable.</li></ul></div>
|
|
</div><br/><div id="navigation-bar" class="card fluid">
|
|
<h2 class="section double-padded">Navigation bar</h2>
|
|
|
|
<div class="section"><p>The navigation bar element has been minimally styled, allowing you to create simple vertical navigation menus for your web apps. Apart from styling from links, custom classes (<code>.sublink-1</code> and <code>.sublink-2</code>) are provided for creating navigation trees.</p></div>
|
|
<div class="section"><h3>Example</h3><nav>
|
|
<a href="#" class="doc">Home</a> <span class="doc">News</span>
|
|
<a href="#" class="sublink-1 doc">New Courses</a> <a href="#" class="sublink-1 doc">Certifications</a>
|
|
<span class="sublink-1 doc">Events</span> <a href="#" class="sublink-2 doc">Course Showcase - 12th, Dec</a>
|
|
<a href="#" class="sublink-2 doc">Staff AMA - 16th, Dec</a> <a href="#" class="sublink-1 doc">Policy Update</a>
|
|
<a href="#" class="doc">About</a> <a href="#" class="doc">Contact</a>
|
|
</nav></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><nav></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span><span class="highlight-a">></span>Category 1<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><span></span>Category 2<span class="highlight-a"></span></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"sublink-1"</span><span class="highlight-a">></span>Item 2.1<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"sublink-1"</span><span class="highlight-a">></span>Category 2.2<span class="highlight-a"></span></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"sublink-2"</span><span class="highlight-a">></span>Item 2.2.1<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"></nav></span></span></pre></div>
|
|
|
|
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>It is recommended that you combine the navigation bar element with the <a href="#grid">grid system</a> to create responsive navigation menus for your web apps.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for navigation bars can be changed by changing the value of the <code>--nav-fore-color</code> variable.</li><li>Background color for navigation bars can be changed by changing the value of the <code>--nav-back-color</code> variable.</li><li>Border color for navigation bars can be changed by changing the value of the <code>--nav-border-color</code> variable.</li><li>Background color for focused buttons inside navigation bars can be changed by changing the value of the <code>--nav-hover-back-color</code> variable.</li><li>Text color for links inside navigation bars can be changed by changing the value of the <code>--nav-link-color</code> variable.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="footer" class="card fluid">
|
|
<h2 class="section double-padded">Footer</h2>
|
|
|
|
<div class="section"><p>The footer element has been minimally styled, aiming to provide you with a clean base to create your web apps' footers.</p></div>
|
|
<div class="section"><h3>Example</h3><footer> <p class="doc">© 2016-2017 Web Corporation | <a href="#" class="doc">About</a> | <a href="#" class="doc">Terms of use</a></p> </footer></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><footer></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>Footer text<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"></footer></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Sticky footer</h4><p>You can make your web app's footer sticky (<code>.sticky</code>), by applying the appropriate modifier.</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><footer</span> <span class="highlight-b">class</span>=<span class="highlight-c">"sticky"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>Footer text<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"></footer></span></span></pre></div>
|
|
|
|
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for the footer can be changed by changing the value of the <code>--footer-fore-color</code> variable.</li><li>Background color for the footer can be changed by changing the value of the <code>--footer-back-color</code> variable.</li><li>Border color for the footer can be changed by changing the value of the <code>--footer-border-color</code> variable.</li><li>Text color for links inside the footer can be changed by changing the value of the <code>--footer-link-color</code> variable.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li></ul></div>
|
|
</div><br/><div id="drawer" class="card fluid">
|
|
<h2 class="section double-padded">Menu drawer</h2>
|
|
|
|
<div class="section"><p>The drawer component of <strong>mini.css</strong> is used to create responsive navigation menus for your web apps. It is composed of three components - the drawer, the toggle button and the close button:</p>
|
|
<ul><li>To create a drawer, simply create a checkbox input, applying the appropriate class to it (<code>.drawer</code>), immediately followed by a container of your liking (e.g. a <code><div></code> or <code><nav></code>). The former serves as your drawer's control, while the latter is the actual drawer container.</li>
|
|
<li>Create a label anywhere outside your drawer's container for the checkbox controlling your drawer, applying the appropriate class (<code>.drawer-toggle</code>). This will serve as the toggle button for your drawer menu.</li>
|
|
<li>Finally, inside your drawer's container, add another label for the checkbox controlling your drawer, applying the appropriate class (<code>.drawer-close</code>). This will serve as the close button for your drawer menu.</li>
|
|
</ul></div>
|
|
<div class="section"><h3>Example</h3><div style="height: 8rem; position: relative; text-align: center;"><br>
|
|
<style>.drawer + .demo { position: absolute; height: 8rem; z-index: 0; top: 0; right: calc(0rem - 320px - 0.5rem); padding: 0.5rem; text-align: left;} [type="checkbox"]:checked.drawer + .demo { z-index: 1001; margin-right: 0.5rem;}</style>
|
|
<label for="demo-toggle" class="button drawer-toggle persistent doc"></label>
|
|
<input type="checkbox" id="demo-toggle" class="drawer persistent"> <div class="demo doc">
|
|
<label for="demo-toggle" class="drawer-close doc"></label><a href="#" class="doc">Home</a><br/> <a href="#" class="doc">News</a><br/>
|
|
<a href="#" class="doc">About</a><br/> <a href="#" class="doc">Contact</a><br/></div>
|
|
</div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer-toggle"</span><span class="highlight-a">></label></span></span>
|
|
<span class="code-line"></span>
|
|
<span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer-close"</span><span class="highlight-a">></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span><span class="highlight-a">></span>Home<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Persistent drawer</h4><p>If you want your drawer menus to not expand into normal containers on larger screens, simply add the appropriate modifier (<code>.persistent</code>) on the checkbox controlling the drawer and its toggle button.</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer-toggle persistent"</span><span class="highlight-a">></label></span></span>
|
|
<span class="code-line"></span>
|
|
<span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer persistent"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer-close"</span><span class="highlight-a">></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span><span class="highlight-a">></span>Home<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"row"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-md-4"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer-close"</span><span class="highlight-a">></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span><span class="highlight-a">></span>Home<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"col-sm-12 col-md-8"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>Page content<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can combine the drawer menu with the <a href="#grid">grid system</a> to create responsive menus that are part of the layout of your web app.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-c"><!-- Do not place other stuff between these --></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"drawer-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"drawer-close"</span><span class="highlight-a">></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><a</span> <span class="highlight-b">href</span>=<span class="highlight-c">"#"</span><span class="highlight-a">></span>Home<span class="highlight-a"></a></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> You should not place anything between the checkbox controlling the drawer and the container.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Drawer menus are responsive by default and will expand into normal containers on screens larger or equal to <code>768px</code> wide.</li><li>It is highly recommended to place your drawer's toggle button inside your web app's header element.</li><li>You can combine the navigation bar element with the drawer menu for better results.</li><li>Remember to apply the appropriate classes to any and all elements, as indicated in the examples. Failing to do so will result in the drawer menu not rendering or behaving properly.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color can be changed globally by changing the value of the <code>--fore-color</code> variable. This will affect the text color of the toggle button and items inside the drawer container.</li><li>Background color for the drawer container can be changed by changing the value of the <code>--drawer-back-color</code> variable.</li><li>Border color for the drawer container can be changed by changing the value of the <code>--drawer-border-color</code> variable.</li><li>Text color for the drawer close button can be changed by changing the values of the <code>--drawer-close-color</code>.</li><li>Background color for the drawer close button when focused or hovered over can be changed by changing the values of the <code>--drawer-hover-back-color</code>.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="tables" class="card fluid">
|
|
<h2 class="section double-padded">Tables</h2>
|
|
|
|
<div class="section"><p>Tables are styled in a minimal, modern and responsive manner, allowing users on all devices to easily browse tabular data, taking advantage of the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="_blank">Flexbox layout</a>'s capabilities. To make tabular data properly display on mobile devices, remember to specify a <code>data-label</code> attribute for each <code><></code> element (usually same as the heading of the column).</p></div>
|
|
<div class="section"><h3>Example</h3><h6 style="text-align:center">Desktop view</h6>
|
|
<table class="doc"><caption class="doc">People</caption>
|
|
<thead class="doc"><tr class="doc"><th class="doc">Name</th><th class="doc">Surname</th><th class="doc">Alias</th></tr></thead>
|
|
<tbody class="doc">
|
|
<tr class="doc"><td data-label="Name" class="doc">Chad</td><td data-label="Surname" class="doc">Wilberts</td><td data-label="Alias" class="doc">MrOne</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Adam</td><td data-label="Surname" class="doc">Smith</td><td data-label="Alias" class="doc">TheSmith</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Sophia</td><td data-label="Surname" class="doc">Canderson</td><td data-label="Alias" class="doc">Candee</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Nick</td><td data-label="Surname" class="doc">Thomson</td><td data-label="Alias" class="doc">NickThom</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Mark</td><td data-label="Surname" class="doc">Gerkis</td><td data-label="Alias" class="doc">Markie</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">John</td><td data-label="Surname" class="doc">Fergusson</td><td data-label="Alias" class="doc">Fergujohn</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Sylvia</td><td data-label="Surname" class="doc">Pouleau</td><td data-label="Alias" class="doc">Sylver</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Norman</td><td data-label="Surname" class="doc">Jones</td><td data-label="Alias" class="doc">NormalJones</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Trevor</td><td data-label="Surname" class="doc">Heidel</td><td data-label="Alias" class="doc">Heidi</td></tr>
|
|
</tbody>
|
|
</table><br/><h6 style="text-align:center">Mobile view</h6>
|
|
<table class="doc cardized"><caption class="doc">People</caption>
|
|
<thead class="doc"><tr class="doc"><th class="doc">Name</th><th class="doc">Surname</th><th class="doc">Alias</th></tr></thead>
|
|
<tbody class="doc">
|
|
<tr class="doc"><td data-label="Name" class="doc">Chad</td><td data-label="Surname" class="doc">Wilberts</td><td data-label="Alias" class="doc">MrOne</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Adam</td><td data-label="Surname" class="doc">Smith</td><td data-label="Alias" class="doc">TheSmith</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Sophia</td><td data-label="Surname" class="doc">Canderson</td><td data-label="Alias" class="doc">Candee</td></tr>
|
|
</tbody>
|
|
</table></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><table></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <caption></span>People<span class="highlight-a"></caption></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Name<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Surname<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Alias<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Chad<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Wilberts<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>MrOne<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Adam<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Smith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>TheSmith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Sophia<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Canderson<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>Candee<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"></table></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Horizontal tables</h4><p>You can create horizontal tables (<code>.horizontal</code>), by applying the appropriate class.</p><h5>Example</h5><table class="doc horizontal"><caption class="doc">People</caption>
|
|
<thead class="doc"><tr class="doc"><th class="doc">Name</th><th class="doc">Surname</th><th class="doc">Alias</th></tr></thead>
|
|
<tbody class="doc">
|
|
<tr class="doc"><td data-label="Name" class="doc">Chad</td><td data-label="Surname" class="doc">Wilberts</td><td data-label="Alias" class="doc">MrOne</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Adam</td><td data-label="Surname" class="doc">Smith</td><td data-label="Alias" class="doc">TheSmith</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Sophia</td><td data-label="Surname" class="doc">Canderson</td><td data-label="Alias" class="doc">Candee</td></tr>
|
|
</tbody>
|
|
</table><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><table</span> <span class="highlight-b">class</span>=<span class="highlight-c">"horizontal"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <caption></span>People<span class="highlight-a"></caption></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Name<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Surname<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Alias<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Chad<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Wilberts<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>MrOne<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Adam<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Smith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>TheSmith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Sophia<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Canderson<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>Candee<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"></table></span></span></pre><br/><h4>Striped tables</h4><p>You can create striped tables (<code>.striped</code>), by applying the appropriate class.</p><h5>Example</h5><table class="doc striped"><caption class="doc">People</caption>
|
|
<thead class="doc"><tr class="doc"><th class="doc">Name</th><th class="doc">Surname</th><th class="doc">Alias</th></tr></thead>
|
|
<tbody class="doc">
|
|
<tr class="doc"><td data-label="Name" class="doc">Chad</td><td data-label="Surname" class="doc">Wilberts</td><td data-label="Alias" class="doc">MrOne</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Adam</td><td data-label="Surname" class="doc">Smith</td><td data-label="Alias" class="doc">TheSmith</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Sophia</td><td data-label="Surname" class="doc">Canderson</td><td data-label="Alias" class="doc">Candee</td></tr>
|
|
</tbody>
|
|
</table><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><table</span> <span class="highlight-b">class</span>=<span class="highlight-c">"striped"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <caption></span>People<span class="highlight-a"></caption></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Name<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Surname<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Alias<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Chad<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Wilberts<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>MrOne<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Adam<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Smith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>TheSmith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Sophia<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Canderson<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>Candee<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"></table></span></span></pre><br/><h4>Hoverable tables</h4><p>You can create hoverable tables (<code>.hoverable</code>), by applying the appropriate class.</p><h5>Example</h5><table class="doc hoverable"><caption class="doc">People</caption>
|
|
<thead class="doc"><tr class="doc"><th class="doc">Name</th><th class="doc">Surname</th><th class="doc">Alias</th></tr></thead>
|
|
<tbody class="doc">
|
|
<tr class="doc"><td data-label="Name" class="doc">Chad</td><td data-label="Surname" class="doc">Wilberts</td><td data-label="Alias" class="doc">MrOne</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Adam</td><td data-label="Surname" class="doc">Smith</td><td data-label="Alias" class="doc">TheSmith</td></tr>
|
|
<tr class="doc"><td data-label="Name" class="doc">Sophia</td><td data-label="Surname" class="doc">Canderson</td><td data-label="Alias" class="doc">Candee</td></tr>
|
|
</tbody>
|
|
</table><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><table</span> <span class="highlight-b">class</span>=<span class="highlight-c">"hoverable"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <caption></span>People<span class="highlight-a"></caption></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Name<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Surname<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th></span>Alias<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Chad<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Wilberts<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>MrOne<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Adam<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Smith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>TheSmith<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Name"</span><span class="highlight-a">></span>Sophia<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Surname"</span><span class="highlight-a">></span>Canderson<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Alias"</span><span class="highlight-a">></span>Candee<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"></table></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><table></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <caption></span>People<span class="highlight-a"></caption></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><td></span>Bad idea<span class="highlight-a"></td></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </thead></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"> <tr></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><th</span> <span class="highlight-b">data-label</span>=<span class="highlight-c">"Bad"</span><span class="highlight-a">></span>Also bad idea<span class="highlight-a"></th></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tr></span></span>
|
|
<span class="code-line"><span class="highlight-a"> </tbody></span></span>
|
|
<span class="code-line"><span class="highlight-a"></table></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid placing <code><td></code> elements in the <code><thead></code> of your tables, as well as placing <code><th></code> elements in the <code><tbody></code>.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Remember to always specify a <code>data-label</code> attribute for all of your <code><td></code> elements, otherwise they will not display properly on mobile.</li><li>Due to the way tables are displayed, the <code><tfoot></code> element is not supported.</li><li>Tables are vertically scrollable by default, with a <code>max-height</code> property of <code>400px</code>.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for <code><th></code> and <code><td></code> elements can be changed by changing the values of the <code>--table-head-fore-color</code> and <code>--table-body-fore-color</code> variables respectively.</li><li>Background color for <code><th></code> and <code><td></code> elements can be changed by changing the values of the <code>--table-head-back-color</code> and <code>--table-body-back-color</code> variables respectively.</li><li>Border color for tables can be changed by changing the value of the <code>--table-border-color</code> variable.</li><li>Border color for the separator between a table's heading and a table's body can be changed by changing the value of the <code>--table-border-separator-color</code> variable.</li><li>Alternative background color for <code><td></code> elements in striped tables can be changed by changing the value of the <code>--table-body-alt-back-color</code> variable.</li><li>Hover background color for <code><tr></code> elements in hoverable tables can be changed by changing the value of the <code>--table-body-hover-back-color</code> variable.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="text-highlighting" class="card fluid">
|
|
<h2 class="section double-padded">Text highlighting</h2>
|
|
|
|
<div class="section"><p>The native HTML5 mark element has been minimally styled to allow for easy text highlighting.</p></div>
|
|
<div class="section"><h3>Example</h3><p class="doc">This is a paragraph with some <mark class="doc">highlighted text</mark>.</p></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><p></span>This is some <span class="highlight-a"><mark></span>highlighted text<span class="highlight-a"></mark></span>.<span class="highlight-a"></p></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Color variants</h4><p>You can change the color of highlighted text, based on context by applying the appropriate class (secondary - <code>.secondary</code> or tertiary - <code>.tertiary</code>).</p><h5>Example</h5><p class="doc">This is a <mark class="doc secondary">secondary highlight</mark> and this is a <mark class="doc tertiary">tertiary highlight</mark>.</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><p></span>This is a <span class="highlight-a"><mark</span> <span class="highlight-b">class</span>=<span class="highlight-c">"secondary"</span><span class="highlight-a">></span>secondary highlight<span class="highlight-a"></mark></span> and this is a <span class="highlight-a"><mark</span> <span class="highlight-b">class</span>=<span class="highlight-c">"tertiary"</span><span class="highlight-a">></span>tertiary highlight<span class="highlight-a"></mark></span>.<span class="highlight-a"></p></span></span></pre><br/><h4>Style variants</h4><p>You can make highlights look like tags (<code>.tag</code>) or display as inline blocks (<code>.inline-block</code>), by applying the appropriate class.</p><h5>Example</h5><p class="doc">This is a highlight styled as a <mark class="doc tag">tag</mark>.</p><p><mark class="doc inline-block">This is some highlighted text that is displayed as an inline block.</mark></p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><p></span>This is a highlight styled as a <span class="highlight-a"><mark</span> <span class="highlight-b">class</span>=<span class="highlight-c">"tag"</span><span class="highlight-a">></span>tag<span class="highlight-a"></mark></span>.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p></span><span class="highlight-a"><mark</span> <span class="highlight-b">class</span>=<span class="highlight-c">"inline-block"</span><span class="highlight-a">></span>This is some highlighted text that is displayed as an inline block.<span class="highlight-a"></mark></span><span class="highlight-a"></p></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><mark</span> <span class="highlight-b">class</span>=<span class="highlight-c">"inline-block"</span><span class="highlight-a">></span><span class="highlight-a"><mark</span> <span class="highlight-b">class</span>=<span class="highlight-c">"secondary"</span><span class="highlight-a">></span>Secondary highlight<span class="highlight-a"></mark></span> inside a inline block.<span class="highlight-a"></mark></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can nest a highlight inside another one, if the outer one is displayed as an inline-block.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><mark</span> <span class="highlight-b">class</span>=<span class="highlight-c">"primary inverse"</span><span class="highlight-a">></span>Highlight<span class="highlight-a"></mark></span></span>
|
|
</pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid applying multiple color modifiers on the same highlight.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Highlighted text scales according to its parent element, so it can be used inside any kind of element (headings, forms, paragraphs etc.).</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for highlighted text can be changed by changing the value of the <code>--mark-fore-color</code> variable.</li><li>Background color for highlighted text can be changed by changing the value of the <code>--mark-back-color</code> variable.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="toasts" class="card fluid">
|
|
<h2 class="section double-padded">Toasts</h2>
|
|
|
|
<div class="section"><p><strong>mini.css</strong> provides you with toast messages (<code>.toast</code>), allowing you to display native-looking notifications on mobile devices.</p></div>
|
|
<div class="section"><h3>Example</h3><div class="container" style="height: 8rem; position: relative;"><span class="toast doc" style="position: absolute;">This is a toast message!</span></div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"toast"</span><span class="highlight-a">></span>This is a toast message!<span class="highlight-a"></span></span></span></pre></div>
|
|
|
|
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Toast elements do not have any pre-defined behavior, but you can use Javascript to add functionality to them.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for toast messages can be changed by changing the value of the <code>--toast-fore-color</code> variable.</li><li>Background color for toast messages can be changed by changing the value of the <code>--toast-back-color</code> variable.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="tooltips" class="card fluid">
|
|
<h2 class="section double-padded">Tooltips</h2>
|
|
|
|
<div class="section"><p>You can utilize the <code>aria-label</code> property to create accessible tooltips (<code>.tooltip</code>), allowing you to display explanatory text for different elements.</p></div>
|
|
<div class="section"><h3>Example</h3><p class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</p></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"tooltip"</span> <span class="highlight-b">aria-label</span>=<span class="highlight-c">"Tooltip text"</span><span class="highlight-a">></span>Hover over text to see tooltip<span class="highlight-a"></span></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Position variant</h4><p>You can make tooltips display below the related text, by adding the appropriate class (<code>.bottom</code>).</p><h5>Example</h5><p class="tooltip bottom" aria-label="This is a bottom tooltip">Hover over this text to see a tooltip!</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"tooltip bottom"</span> <span class="highlight-b">aria-label</span>=<span class="highlight-c">"Tooltip text"</span><span class="highlight-a">></span>Hover over text to see tooltip<span class="highlight-a"></span></span></span></pre></div>
|
|
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Tooltips depend on the <code>aria-label</code> property, so they are fully accessible on screen readers.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Text color for tooltips can be changed by changing the value of the <code>--tooltip-fore-color</code> variable.</li><li>Background color for tooltips can be changed by changing the value of the <code>--tooltip-back-color</code> variable.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="modal-dialogs" class="card fluid">
|
|
<h2 class="section double-padded">Modal dialogs</h2>
|
|
|
|
<div class="section"><p><strong>mini.css</strong> provides you with a modal dialog component to display messages to users. It is composed of three components - the modal dialog, the toggle button and the close button:</p>
|
|
<ul><li>To create a modal dialog, simply create a checkbox input, applying the appropriate class to it (<code>.modal</code>), immediately followed by a <code><div></code> container. The former serves as your modal dialog's control, while the latter is the actual modal dialog container.</li>
|
|
<li>Create a label anywhere outside your modal dialog's container for the checkbox controlling your modal dialog. This will serve as the toggle button for your modal dialog.</li>
|
|
<li>Finally, inside your modal dialog's container, add another label for the checkbox controlling your modal dialog, applying the appropriate class (.modal-close). This will serve as the close button for your modal dialog.</li>
|
|
</ul></div>
|
|
<div class="section"><h3>Example</h3><input type="checkbox" class="modal" id="modal-example"><div class="modal doc"><div class="card doc"><label for="modal-example" class="modal-close doc"></label><h3 class="section double-padded doc">Modal</h3><p class="section double-padded doc">This is a modal dialog!</p></div></div><label for="modal-example" class="button doc">Show modal dialog</label></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"modal-control"</span><span class="highlight-a">></span>Show modal<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"></span>
|
|
<span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"modal-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"modal"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"modal-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"modal-close"</span> <span class="highlight-a">></span><span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><h3</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></span>Modal<span class="highlight-a"></h3></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></span>This is a modal dialog!<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"modal-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"modal"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">role</span>=<span class="highlight-c">"dialog"</span> <span class="highlight-b">aria-labelledby</span>=<span class="highlight-c">"dialog-title"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"modal-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"modal-close"</span> <span class="highlight-a">></span><span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><h3</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"dialog-title"</span><span class="highlight-a">></span>Modal<span class="highlight-a"></h3></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></span>This is a modal dialog!<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can use the <code>role="dialog"</code> to add accessibility to your modal dialogs. Remember to properly label it and manage keyboard focus, as required.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"modal-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"modal"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"><span class="highlight-c"><!-- Do not place other stuff between these --></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"card"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"modal-control"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"modal-close"</span> <span class="highlight-a">></span><span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><h3</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></span>Modal<span class="highlight-a"></h3></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"section"</span><span class="highlight-a">></span>This is a modal dialog!<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> You should not place anything between the checkbox controlling the modal dialog and the container.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Modal dialogs should be used in combination with the <a href="#card">card</a> component for best results.</li><li>Remember to apply the appropriate classes to any and all elements, as indicated in the examples. Failing to do so will result in the modal dialog not rendering or behaving properly.</li><li>You can omit the toggle for the modal dialog and use Javascript to show/hide it, instead. You can also use any correctly linked label inside the modal dialog to change its state.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Background color for the modal dialog overlay can be changed by changing the value of <code>--modal-overlay-color</code>.</li><li>Text color for the modal dialog close button can be changed by changing the value of the <code>--modal-close-color</code>.</li><li>Background color for the modal dialog close button when focused or hovered over can be changed by changing the value of the <code>--modal-close-hover-color</code>.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="spoilers-and-accordions" class="card fluid">
|
|
<h2 class="section double-padded">Spoilers & accordions</h2>
|
|
|
|
<div class="section"><p><strong>mini.css</strong> provides you with accessible spoilers and accordions. They are composed of two components - the wrapper, the toggle button and the content container:</p>
|
|
<ul><li>To create a collapsible spoiler, simply create a <code><div></code>, applying the appropriate class to it (<code>.collapse</code>). This serves as the wrapper for the collapsible spoiler.</li>
|
|
<li>Inside the wrapper, create a checkbox or radio input, immediately followed by a <code><label></code> for the checkbox. The former serves as your collapsible spoiler's control, while the latter is the toggle button for your collapsible spoiler.</li>
|
|
<li>Create a <code><div></code> right after the <code><label></code>. This will serve as the container for the collapsible content.</li>
|
|
</ul>
|
|
<p>If you want to create an accordion, simply repeat the last two steps above for each section of the accordion. In order to make collapsible spoilers and accordions fully accessible, it is highly recommended to add the <code>aria-hidden="true"</code> attribute to all labels and inputs that control the behavior of these components.</p></div>
|
|
<div class="section"><h3>Example</h3><div class="collapse"><input type="checkbox" id="collapse-example1" checked aria-hidden="true"><label for="collapse-example1" aria-hidden="true">Collapse section 1</label><div><p>This is the first section of the collapse</p></div><input type="checkbox" id="collapse-example2" aria-hidden="true"><label for="collapse-example2" aria-hidden="true">Collapse section 2</label><div><p>This is the second section of the collapse</p></div></div><br/>
|
|
<div class="collapse"><input type="radio" name="accordion" id="accordion-example1" checked aria-hidden="true"><label for="accordion-example1" aria-hidden="true">Accordion section 1</label><div><p>This is the first section of the accordion</p></div><input type="radio" name="accordion" id="accordion-example2" aria-hidden="true"><label for="accordion-example2" aria-hidden="true">Accordion section 2</label><div><p>This is the second section of the accordion</p></div></div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"collapse"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"collapse-section1"</span> <span class="highlight-b">checked</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"collapse-section1"</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span>Collapse section 1<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This is the first section of the collapse<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"collapse-section2"</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"collapse-section2"</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span>Collapse section 2<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This is the second section of the collapse<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"collapse"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"radio"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"accordion-section1"</span> <span class="highlight-b">checked</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span> <span class="highlight-b">name</span>=<span class="highlight-c">"accordion"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"accordion-section1"</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span>Accordion section 1<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This is the first section of the accordion<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"radio"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"accordion-section2"</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span> <span class="highlight-b">name</span>=<span class="highlight-c">"accordion"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"accordion-section2"</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span>Accordion section 2<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This is the second section of the accordion<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div>
|
|
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"collapse"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><input</span> <span class="highlight-b">type</span>=<span class="highlight-c">"checkbox"</span> <span class="highlight-b">id</span>=<span class="highlight-c">"collapse-section1"</span> <span class="highlight-b">checked</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span></span>
|
|
<span class="code-line"> <span class="highlight-c"><!-- Do not place other stuff between these --></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><label</span> <span class="highlight-b">for</span>=<span class="highlight-c">"collapse-section1"</span> <span class="highlight-b">aria-hidden</span>=<span class="highlight-c">"true"</span><span class="highlight-a">></span>Collapse section 1<span class="highlight-a"></label></span></span>
|
|
<span class="code-line"> <span class="highlight-c"><!-- Do not place other stuff between these --></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><div></span></span>
|
|
<span class="code-line"> <span class="highlight-a"><p></span>This is the first section of the collapse<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"> <span class="highlight-a"></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> You should not place anything between the checkbox controlling the collapsible spoiler and its label or between the label and the content container.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Make sure all the radio buttons in the same accordion have the same <code>name</code>.</li><li>If you want a collapsible spoiler or an accordion section to be expanded by default, you can add the <code>checked</code> attribute to the respective collapsible spooiler's or section's control.</li><li>The <code>max-height</code> of the content container is <code>400px</code>.</li><li>Using the <code>aria-hidden="true"</code> attribute is highly recommended, as screen readers will ignore the controls of the collapsible spoiler or accordion and read all the contained content normally.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Background color, text color and background color on hover for the collapsible spoiler's labels can be changed by changing the values of <code>--collapse-label-back-color</code>, <code>--collapse-label-fore-color</code> and <code>--collapse-label-hover-back-color</code> respectively.</li><li>Border color for the collapsible spoiler can be changed by changing the value of the <code>--collapse-border-color</code>.</li><li>Background color for the collapsible spoiler's content can be changed by changing the value of the <code>--collapse-content-back-color</code>.</li><li>Background color and border for the spoiler's content selected labels can be changed by changing the values of the <code>--collapse-selected-label-back-color</code> and <code>--collapse-selected-label-border-color</code> respectively.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="progress-bars" class="card fluid">
|
|
<h2 class="section double-padded">Progress bars</h2>
|
|
|
|
<div class="section"><p>Progress bars are minimally styled to match with the rest of the framework's aesthetics and be consistent across all modern browsers.</p></div>
|
|
<div class="section"><h3>Example</h3><progress value="450" max="1000"></progress></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"450"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"1000"</span><span class="highlight-a">></progress></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Inline progress bars</h4><p>You can create inline progress bars (<code>.inline</code>), by applying the appropriate modifier.</p><h5>Example</h5><p class="doc"><progress value="450" max="1000" class="inline"></progress> 45% completed...</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"450"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"1000"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"inline"</span><span class="highlight-a">></progress></span></span></pre><br/><h4>Color variants</h4><p>You can create primary, secondary or tertiary (<code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code>) progress bars, simply by adding the appropriate color modifier.</p><h5>Example</h5><progress value="450" max="1000" class="primary"></progress><progress value="450" max="1000" class="secondary"></progress><progress value="450" max="1000" class="tertiary"></progress><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"450"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"1000"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"primary"</span><span class="highlight-a">></progress></span></span>
|
|
<span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"450"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"1000"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"secondary"</span><span class="highlight-a">></progress></span></span>
|
|
<span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"450"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"1000"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"tertiary"</span><span class="highlight-a">></progress></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"45"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"100"</span><span class="highlight-a">></progress></span></span>
|
|
<span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"450.0"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"1000.0"</span><span class="highlight-a">></progress></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid using different values than <code>1000</code> for progress bars' <code>max</code> attribute, as well as floating point values for either <code>max</code> or <code>value</code>.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><progress</span> <span class="highlight-b">value</span>=<span class="highlight-c">"450"</span> <span class="highlight-b">max</span>=<span class="highlight-c">"1000"</span> <span class="highlight-b">class</span>=<span class="highlight-c">"primary secondary"</span><span class="highlight-a">></progress></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid applying two color modifiers on the same progress bar.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Progress bars are designed to work with a <code>max="1000"</code> attribute, as this covers the most common use-cases.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Foreground color for progress bars can be changed by changing the value of the <code>--progress-fore-color</code> variable.</li><li>Background color for progress bars can be changed by changing the value of the <code>--progress-back-color</code> variable.</li><li>You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal border radius for elements can be changed globally by changing the value of the <code>--universal-border-radius</code> variable.</li></ul></div>
|
|
</div><br/><div id="donut-spinners" class="card fluid">
|
|
<h2 class="section double-padded">Donut spinners</h2>
|
|
|
|
<div class="section"><p><strong>mini.css</strong> provides you with animated loading indicators (<code>.spinner</code>), which you can use to indicate that some content is loading.</p></div>
|
|
<div class="section"><h3>Example</h3><div class="spinner"></div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"spinner"</span><span class="highlight-a">></div></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Color variants</h4><p>You can create primary, secondary or tertiary (<code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code>) donut spinners, simply by adding the appropriate color modifier.</p><h5>Example</h5><span class="spinner primary"></span><span class="spinner secondary"></span><span class="spinner tertiary"></span><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"spinner primary"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"spinner secondary"</span><span class="highlight-a">></div></span></span>
|
|
<span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"spinner tertiary"</span><span class="highlight-a">></div></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"spinner"</span><span class="highlight-a">></span>Don't place text here.<span class="highlight-a"></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid inserting text inside donut spinners.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><div</span> <span class="highlight-b">class</span>=<span class="highlight-c">"spinner primary secondary"</span><span class="highlight-a">></div></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid applying two color modifiers on the same donut spinner.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>You can use either a <code><div></code> or a <code><span></code> element to create a donut spinner.</li><li>You can add the <code>role="progressbar"</code> attribute to spinner donut elements to increase accessibility.</li><li>You can inline donut spinners inside a paragraph or some other textual content.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Foreground color for donut spinners can be changed by changing the value of the <code>--spinner-fore-color</code> variable.</li><li>Background color for donut spinners can be changed by changing the value of the <code>--spinner-back-color</code> variable.</li><li>You can customize the colors of different color variants by changing the values of the related variables in their respective definitions.</li><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li></ul></div>
|
|
</div><br/><div id="icons" class="card fluid">
|
|
<h2 class="section double-padded">Icons</h2>
|
|
<a href="https://feathericons.com/" class="section double-padded" id="feather-banner" target="_blank" rel="noopener"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#f8f8f8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17" y1="15" x2="9" y2="15"></line></svg> Powered by Feather</a>
|
|
<div class="section"><p><strong>mini.css</strong> comes with a set of 20 commonly-used icons (courtesy of <a href="https://feathericons.com/" target="_blank" rel="noopener">Feather</a>) that you can use anywhere in your web apps, utilizing the appropriate class for each icon.</p></div>
|
|
<div class="section"><h3>Example</h3><div class="row icon-row">
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-alert"></span> .icon-alert</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-bookmark"></span> .icon-bookmark</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-calendar"></span> .icon-calendar</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-cart"></span> .icon-cart</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-credit"></span> .icon-credit</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-edit"></span> .icon-edit</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-help"></span> .icon-help</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-home"></span> .icon-home</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-info"></span> .icon-info</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-link"></span> .icon-link</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-location"></span> .icon-location</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-lock"></span> .icon-lock</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-mail"></span> .icon-mail</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-phone"></span> .icon-phone</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-rss"></span> .icon-rss</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-search"></span> .icon-search</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-settings"></span> .icon-settings</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-share"></span> .icon-share</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-upload"></span> .icon-upload</p></div>
|
|
<div class="col-sm-12 col-md-6 col-lg-3"><p class="doc bordered rounded"><span class="icon-user"></span> .icon-user</p></div>
|
|
</div></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-alert"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-bookmark"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-calendar"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-cart"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-credit"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-edit"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-help"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-home"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-info"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-link"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-location"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-lock"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-mail"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-phone"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-rss"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-search"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-settings"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-share"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-upload"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-user"</span><span class="highlight-a">></span></span></span></pre></div>
|
|
<div class="section double-padded prefiller-example"><h3>Modifiers</h3>
|
|
<h4>Color variants</h4><p>You can create secondary or inverse (<code>.secondary</code>, <code>.inverse</code>) icons, simply by adding the appropriate color modifier.</p><h5>Example</h5><p style="padding: 0.5rem;" class="doc">This is a <span class="icon-home secondary"></span> secondary icon, which has a lighter color.</p><p style="background: #111; color: #f8f8f8; padding: 0.5rem;" class="doc">This is an <span class="icon-home inverse"></span> inverse icon.</p><h5>Sample code</h5><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-alert secondary"</span><span class="highlight-a">></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-alert inverse"</span><span class="highlight-a">></span></span></span></pre></div>
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-alert"</span><span class="highlight-a">></span>Don't place text here.<span class="highlight-a"></span></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid inserting text inside icon elements.</p></div></div><br/><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"icon-alert inverse secondary"</span><span class="highlight-a">></span></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid applying two color modifiers on the same icon.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>You can only use a <code><span></code> element to create an icon.</li><li>You can inline icons inside a paragraph or pretty much any other textual content. Icons scale relative to their parent element.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li></ul></div>
|
|
</div><br/><div id="visibility-helpers" class="card fluid">
|
|
<h2 class="section double-padded">Visibility helpers</h2>
|
|
|
|
<div class="section"><p>You can use visibility helper classes to hide elements for all users (<code>.hidden</code>) or for users not on screen readers (<code>.visually-hidden</code>). There are also responsive visibility helpers provided, for hiding or visually hiding content only for specific screen sizes (<code>.hidden-sm</code>, <code>.hidden-md</code>, <code>.hidden-lg</code> and <code>.visually-hidden-sm</code>, <code>.visually-hidden-md</code> and <code>.visually-hidden-lg</code> respectively).</p></div>
|
|
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"hidden"</span><span class="highlight-a">></span>Not visible for any users.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"visually-hidden"</span><span class="highlight-a">></span>Visible only for screen readers.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"hidden-sm"</span><span class="highlight-a">></span>Not visible for users on screens under 768px wide.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"hidden-md"</span><span class="highlight-a">></span>Not visible for users on screens 768px-1280px wide.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"hidden-lg"</span><span class="highlight-a">></span>Not visible for users on screens wider than 1280px.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"visually-hidden-sm"</span><span class="highlight-a">></span>Visible only for screen readers under 768px wide.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"visually-hidden-md"</span><span class="highlight-a">></span>Visible only for screen readers 768px-1280px wide.<span class="highlight-a"></p></span></span>
|
|
<span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"visually-hidden-lg"</span><span class="highlight-a">></span>Visible only for screen readers wider than 1280px.<span class="highlight-a"></p></span></span></pre></div>
|
|
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"hidden-sm hidden-md"</span><span class="highlight-a">></span>Not visible for users on screens under 1280px wide.<span class="highlight-a"></p></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="do">Do:</mark> You can apply multiple responsive visibility helpers on the same element.</p></div></div><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><p</span> <span class="highlight-b">class</span>=<span class="highlight-c">"hidden visually-hidden"</span><span class="highlight-a">></span>Do not do this.<span class="highlight-a"></p></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid combining <code>.hidden</code> and <code>.visually-hidden</code> or responsive helpers for the same screen size.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Visibility helpers use <code>!important</code> declarations to override any other styles, so exercise caution when using them.</li><li>The specific breakpoints for small, medium and large screen sizes are as follows:<ul><li>small: less than <code>768px</code> wide</li><li>medium: more than or equal to <code>768px</code> wide and less than <code>1280px</code> wide</li><li>large: <code>1280px</code> wide or more</li></ul></li><li>Responsive visibility helper classes are independent, meaning that hiding or visually hiding an element in one screen size will not affect its visibility in any other screen size.</li></ul></div>
|
|
|
|
</div><br/><div id="element-decorators" class="card fluid">
|
|
<h2 class="section double-padded">Element decorators</h2>
|
|
|
|
<div class="section"><p>You can apply generic borders, shadows or border radiuses to any element, by using the appropriate class (<code>.bordered</code>, <code>.shadowed</code>, <code>.rounded</code> or <code>.circular</code>).</p></div>
|
|
<div class="section"><h3>Example</h3><button class="bordered doc">Bordered button</button><button class="primary bordered doc">Bordered button</button><button class="shadowed doc">Shadowed button</button><br/><p><img src="https://placehold.it/200x200?text=rounded" alt="placeholder" class="rounded"> <img src="https://placehold.it/200x200?text=circular" alt="placeholder" class="circular"></p></div>
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"bordered"</span><span class="highlight-a">></span>Bordered element.<span class="highlight-a"></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"shadowed"</span><span class="highlight-a">></span>Shadowed element.<span class="highlight-a"></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"rounded"</span><span class="highlight-a">></span>Rounded element.<span class="highlight-a"></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"circular"</span><span class="highlight-a">></span>Circular element.<span class="highlight-a"></span></span></span></pre></div>
|
|
|
|
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"rounded circular"</span><span class="highlight-a">></span>Do not do this.<span class="highlight-a"></span></span></span></pre></div><div class="col-sm-12 col-md-6"><p><mark class="dont">Don't:</mark> Avoid applying the <code>.rounded</code> and <code>.circular</code> decorators on the same element.</p></div></div></div>
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Element decorators use <code>!important</code> declarations to override any other styles, so exercise caution when using them.</li><li>Element decorators can be used with pretty much every element or component that is available.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Boder color for the generic border decorator can be changed by changing the value of the <code>--generic-border-color</code> variable.</li><li>Box shadow style for the generic shadow can be changed by changing the value of the <code>--generic-box-shadow</code> variable.</li></ul></div>
|
|
</div><br/><div id="responsive-spacing-sizing" class="card fluid">
|
|
<h2 class="section double-padded">Responsive spacing & sizing</h2>
|
|
|
|
<div class="section"><p>You can make elements' spacing or sizing responsive by applying the appropriate class (<code>.responsive-margin</code> or <code>.responsive-padding</code>).</p></div>
|
|
|
|
<div class="section double-padded prefiller-example"><h3>Sample code</h3><pre><span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"responsive-margin"</span><span class="highlight-a">></span>Responsive margin.<span class="highlight-a"></span></span></span>
|
|
<span class="code-line"><span class="highlight-a"><span</span> <span class="highlight-b">class</span>=<span class="highlight-c">"responsive-padding"</span><span class="highlight-a">></span>Responsive padding.<span class="highlight-a"></span></span></span></pre></div>
|
|
|
|
|
|
<div class="section double-padded"><h3>Notes</h3><ul><li>Responsive spacing and sizing modifiers use <code>!important</code> declarations to override any other styles, so exercise caution when using them.</li><li>Responsive spacing and sizing modifiers are independent, meaning that hiding or visually hiding an element in one screen size will not affect its visibility in any other screen size.</li></ul></div>
|
|
<div class="section double-padded"><h3>Customization</h3><ul><li>Universal margin for elements can be changed globally by changing the value of the <code>--universal-margin</code> variable, affecting the responsive spacing modifier. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.</li><li>Universal padding for elements can be changed globally by changing the value of the <code>--universal-padding</code> variable, affecting the responsive sizing modifier.</li></ul></div>
|
|
</div><footer><p><strong>mini.css</strong> was designed and built by <a href="https://github.com/Chalarangelo" target="_blank">@Chalarangelo</a>. Source code licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>.</p><p>Icons provided by <a href="https://feathericons.com/" target="_blank">Feather</a>. Search powered by <a href="http://fusejs.io/" target="_blank">Fuse.js</a>.</p></footer></main>
|
|
</div></div>
|
|
<script>
|
|
// Search script
|
|
var docs= [{id: "getting-started", keys: ["html","viewport","head","meta","getting started","introduction","browser support","installation","usage","setup","cdn","npm","yarn"] },{id: "common-textual-elements", keys: ["p","paragraph","text","textual elements","strong","bold","b","em","i","emphasis","italics","small","a","link","hr","horizontal rule","sub","subscript","sup","exponent","superscript","normalize","reset"] },{id: "heading", keys: ["heading","h1","h2","h3","h4","h5","h6","small","title","subtitle","subheading"] },{id: "images-captions", keys: ["img","image","responsive","responsiveness","caption","figure","figcaption"] },{id: "lists", keys: ["list","ul","ol","li"] },{id: "code-and-quotations", keys: ["code","pre","kbd","blockquote","quotation"] },{id: "grid", keys: ["grid","grid system","col","column","layout","row","container","small","medium","large","sm","md","lg","cols","predefined","offset","order","reorder","first","last","normal"] },{id: "cards", keys: ["card","row","section","container","col","column","small","large","fluid","warning","error"] },{id: "card-sections", keys: ["card","row","section","container","col","column","media","double-padded","dark"] },{id: "forms-and-input", keys: ["form","fieldset","legend","input","type","text","checkbox","radio","email","password","tel","input-group","input group","row","col","column","vertical","fluid","file","upload","select","textarea","option","label"] },{id: "buttons", keys: ["button","input","reset","submit","link","a","label","primary","secondary","tertiary","aria","small","large","inverse"] },{id: "input-grouping", keys: ["input group","input-group","vertical","fluid","input","button","button group","button-group"] },{id: "header", keys: ["navigation","header","sticky","button","logo","link"] },{id: "navigation-bar", keys: ["navigation","bar","nav","link"] },{id: "footer", keys: ["navigation","footer","sticky","link"] },{id: "drawer", keys: ["drawer","checkbox","toggle","close","drawer-toggle","drawer-close","menu","navigation","hamburger"] },{id: "tables", keys: ["table","caption","thead","tbody","tr","th","td","horizontal","striped","hoverable"] },{id: "text-highlighting", keys: ["mark","highlight","text highlighting","tag","primary","secondary","tertiary","inline-block"] },{id: "toasts", keys: ["span","toast","mobile","contextual","message"] },{id: "tooltips", keys: ["tooltip","aria-label","contextual","bottom","span"] },{id: "modal-dialogs", keys: ["modal","dialog","contextual","alert","notification"] },{id: "spoilers-and-accordions", keys: ["spoiler","collapse","accordion","contextual","vertical tabs"] },{id: "progress-bars", keys: ["progress","bar","primary","secondary","tertiary","inline"] },{id: "donut-spinners", keys: ["spinner","donut","loading","progress","primary","secondary","tertiary","inline","animation","animated"] },{id: "icons", keys: ["icon","svg","feather","icons"] },{id: "visibility-helpers", keys: ["hidden","visibility","visually-hidden","accessibility","utility"] },{id: "element-decorators", keys: ["border","border-radius","bordered","rounded","circular","shadowed","utility"] },{id: "responsive-spacing-sizing", keys: ["responsiveness","margin","padding","responsive-margin","responsive-margin"] }];
|
|
var options = {threshold:0.4, keys:["keys"]};
|
|
var fuse = new Fuse(docs,options);
|
|
function search(){
|
|
var query = document.getElementById('search-bar').value;
|
|
if(query.length){
|
|
var result = fuse.search(query);
|
|
if(result.length){
|
|
var resIds = result.map(function(item){
|
|
return ':not(#link-to-'+item.id+')';
|
|
}).join('');
|
|
document.getElementById('search-style').innerHTML = '#no-results{display:none;}#nav-drawer a'+resIds+'{display:none;}';
|
|
}
|
|
else {
|
|
document.getElementById('search-style').innerHTML = '#nav-drawer a{display:none;}#no-results{display:block;}';
|
|
}
|
|
}
|
|
else{
|
|
document.getElementById('search-style').innerHTML = '#no-results{display:none;}';
|
|
}
|
|
}
|
|
// Codepen prefill script
|
|
var el = document.querySelectorAll('.prefiller-example > pre');
|
|
el.forEach(e => e.innerHTML = '<form action="https://codepen.io/pen/define" method="POST" target="_blank" class="codepen-form">' +
|
|
'<input type="hidden" name="data" value=\'' + JSON.stringify({
|
|
html : e.innerText,
|
|
css_external : "https://cdnjs.cloudflare.com/ajax/libs/mini.css/3.0.0-alpha.3/mini-default.css"
|
|
}).replace(/"/g, """)
|
|
.replace(/'/g, "'") + '\'>' +
|
|
'<input type="image" class="codepen-link" src="data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23424242%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolygon%20points%3D%2212%202%2022%208.5%2022%2015.5%2012%2022%202%2015.5%202%208.5%2012%202%22%3E%3C%2Fpolygon%3E%3Cline%20x1%3D%2212%22%20y1%3D%2222%22%20x2%3D%2212%22%20y2%3D%2215.5%22%3E%3C%2Fline%3E%3Cpolyline%20points%3D%2222%208.5%2012%2015.5%202%208.5%22%3E%3C%2Fpolyline%3E%3Cpolyline%20points%3D%222%2015.5%2012%208.5%2022%2015.5%22%3E%3C%2Fpolyline%3E%3Cline%20x1%3D%2212%22%20y1%3D%222%22%20x2%3D%2212%22%20y2%3D%228.5%22%3E%3C%2Fline%3E%3C%2Fsvg%3E" width="40" height="40" value="Open in Codepen">' +
|
|
'</form>' + e.innerHTML);
|
|
</script>
|
|
<style id="search-style">#no-results{display:none;}</style>
|
|
</body></html> |