Merged
This commit is contained in:
parent
cbaa327aaa
commit
249d58e7bc
24 changed files with 8110 additions and 0 deletions
309
docs/v2/contextual.html~HEAD
Normal file
309
docs/v2/contextual.html~HEAD
Normal file
|
@ -0,0 +1,309 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Contextual</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, contextual ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.col-sm-12.col-sm-last.col-md-12.col-md-normal { box-sizing: border-box; border-bottom: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-12.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
.toast.demo { position: relative; top: 2rem; left: calc(50% - 6rem); z-index: 1;} .toast.demo.small { top: 4.5rem; left: calc(50% - 6.75rem);} .toast.demo.large { top: 7.5rem; left: calc(50% - 8rem);}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="contextual-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Contextual</h1>
|
||||||
|
<p style="text-align:justify">The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Almost every website present on the web has some sort of content that needs highlighting in one way or another. The <strong>contextual</strong> module provides you with simple semantic text highlighting that utilises the <code><mark></code> HTML element. Apart from that, this module contains styles and definitions for a simple <code>.toast</code> container, that you can use to display toast messages on your websites and web apps. Toasts mimic the native application notifications of certain devices, making them mobile friendly. Finally, a simple accessible <code>.tooltip</code> implementation is included along with an implementation for <code>.modal</code> dialogs. All components in this module are fully accessible, so that's another thing not to worry about.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>contextual</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="text-highlighting">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Text highlighting</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<p>This is some text with a <mark>highlight</mark>.</p>
|
||||||
|
<p>Apart from the primary highlight style, there are also <mark class="secondary">secondary</mark> and <mark class="tertiary">tertiary</mark> styles for highlighting.</p><br>
|
||||||
|
<p><mark class="inline-block">If you want to highlight a longer piece of text, without line breaks, you can turn the highlight into an inline-block like you see this piece of text being displayed.</mark></p><br>
|
||||||
|
<p>Finally, you can create contextual tags like <mark class="tag">this</mark> or <mark class="tag">7</mark>.</p><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">To add simple highlights in your text, you can use the <code><mark></code> HTML element. These highlights come pre-styled to use the default primary color, but if you would rather use another color for your highlight you can easily add the <code>.secondary</code> or <code>.tertiary</code> class to a <code><mark></code> element. For longer pieces of text that need highlighting, consider adding the <code>.inline-block</code> class to make them stand out even more. Finally, you can create contextual tags, using the <code>.tag</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><mark>primary</mark>
|
||||||
|
<mark class="secondary">secondary</mark>
|
||||||
|
<mark class="tertiary">tertiary</mark>
|
||||||
|
<mark class="inline-block">long highlight text...</mark>
|
||||||
|
<mark class="tag">tag</mark></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Try to use elements with the <code>.inline-block</code> class only when absolutely necessary, as they break the normal text flow of the document. Avoid using this class on shorter pieces of text that span a few words and contain no line breaks.</li>
|
||||||
|
<li><code><mark></code> elements, along with their supporting classes (except for <code>.inline-block</code>) can be easily used in paragraphs, headings and other elements, as they scale according to their parent element.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><mark class="tag tertiary">green tag</mark>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<mark class="inline-block secondary">red chunk</mark></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can combine any of the contextual color classes (<code>.secondary</code> or <code>.tertiary</code>) with the <code>.tag</code> or <code>.inline-block</code> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><mark class="secondary tertiary">no, no</mark>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<mark class="inline-block tag">oh, no</mark></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining two contextual color classes or a <code>.tag</code> and an <code>.inline-block</code>, as these combinations might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><mark class="inline-block">some
|
||||||
|
<mark class="secondary">text</mark>
|
||||||
|
</mark></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can only nest a <code><mark></code> inside another if the outer one is of the <code>.inline-block</code> class. You can color the inner <code><mark></code> using any of the contextual color classes or even make it a <code>.tag</code>. Be careful, however, to not make the inner <code><mark></code> an <code>.inline-block</code> as well.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><mark>some
|
||||||
|
<mark class="secondary">text</mark>
|
||||||
|
</mark></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid using nested <code><mark></code> elements, unless the outer <code><mark></code> element is an <code>.inline-block</code>.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="toasts">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Toasts</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div style="height: 15rem;">
|
||||||
|
<span class="toast demo">I'm a toast message!</span><br/>
|
||||||
|
<span class="toast small demo">I'm a small toast message!</span><br/>
|
||||||
|
<span class="toast large demo">I'm a large toast message!</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align:justify">Toasts aim to help bridge the gap between web and native applications on mobile devices, by displaying native-looking toast messages. To create a toast, wrap some text inside a <code><span></code> element with the <code>.toast</code> class. Toasts appear at the bottom of the screen on top of everything else. If you want to create smaller or larger toast messasges, you can add the <code>.small</code> or <code>.large</code> classes respectively.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="toast">This is a normal toast message!</span>
|
||||||
|
<span class="toast small">This is a large toast message!</span>
|
||||||
|
<span class="toast large">This is a small toast message!</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Toast elements do not have any pre-defined behavior. You should use your own Javascript code and interactive HTML elements to deal with showing and hiding them as necessary.</li>
|
||||||
|
<li>If you want to create your own color or size variants for toast messages, check out the <a href="customization">customization</a> page.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><span class="toast small large">Not a good toast</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining two toast size variants, as this might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="tooltips">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Tooltips</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br /><p class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</p><br />
|
||||||
|
<p class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</p><br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Tooltips can be used to convey context-sensitive information when the user hovers over some text. To create a tooltip, simply wrap the text you want users to hover over in an element with the <code>.tooltip</code> class (our choice is usually a <code><span></code> element, but your needs may differ) and add an <code><span class="fore-secondary">aria-label</span></code> in that element, setting its value to the content of your tooltip. Tooltips display at the top of the hovered text by default, so if you want to show them below the text, add the <code>.bottom</code> class to them.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
|
||||||
|
<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Tooltips are built to be accessible and should display properly on screenreaders.</li>
|
||||||
|
<li>If you are not satisfied with the default tooltip colors, please check out the <a href="customization">customization page</a> for instuctions on how to create your own tooltip variants.</li>
|
||||||
|
<li>Remember to always add the <code><span class="fore-secondary">aria-label</span></code> attribute, otherwise your tooltip will not have any text to show.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="modals">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Modals</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div style="text-align:center"><br/>
|
||||||
|
<label class="button primary large" for="modal-check">Click to display a modal dialog</label><br/><br/>
|
||||||
|
<input id="modal-check" type="checkbox"/>
|
||||||
|
<div class="modal" style="text-align:initial">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-check" class="close"></label>
|
||||||
|
<h3 class="section double-padded">Modal</h3>
|
||||||
|
<div class="section double-padded">
|
||||||
|
<p>This is a modal window!</p>
|
||||||
|
<label class="button primary" for="modal-check">Close modal</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Modal dialogs are pretty ease to make. Simply create an <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> element, immediately followed by a <code><div></code> element with the <code>.modal</code> class. Inside this element, you can add a <code>.card</code> element with your modal dialog's contents. Remember to add a <code><label></code> element linked to your modal dialog's <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> to let users close the dialog. You can also apply the <code>.close</code> class to a <code><label></code> element to display a close icon at the top right of the modal dialog.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><label for="modal-toggle">Show modal</label>
|
||||||
|
|
||||||
|
<input id="modal-toggle" type="checkbox"/>
|
||||||
|
<div class="modal">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-toggle" class="close"></label>
|
||||||
|
<h3 class="section">Modal</h3>
|
||||||
|
<p class="section">This is a modal window!</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>You can use any styles you want from the <strong><a href="card">card</a></strong> module to create different dialogs based on context (e.g. alerts, warnings etc.).</li>
|
||||||
|
<li>Remember to add a <code><label></code> linked to your modal dialog's <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> or use Javascript to alter its state, otherwise users will not be able to close the dialog.</li>
|
||||||
|
<li>You can place your modal dialog anywhere on your page, as long as the structure is not altered. You can also toggle it from anywhere on a page.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><input id="modal-toggle" type="checkbox"/>
|
||||||
|
<label for="modal-toggle">Show modal</label>
|
||||||
|
<div class="modal" role="dialog" aria-labelledby="dialogTitle">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-toggle" class="close"></label>
|
||||||
|
<h3 class="section" id="dialogTitle">Bad Modal</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can use the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_dialog_role">dialog</a>"</span></code> to add accessibility to your modal dialogs. Remember to properly label it and manage keyboard focus, as required.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><input id="modal-toggle" type="checkbox"/>
|
||||||
|
<label for="modal-toggle">Show modal</label>
|
||||||
|
<div class="modal">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-toggle" class="close"></label>
|
||||||
|
<h3 class="section">Bad Modal</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The syntax and structure of the modal dialog's container is very strict. Try to follow it exactly as described in this section.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
309
docs/v2/contextual.html~gluon.v3
Normal file
309
docs/v2/contextual.html~gluon.v3
Normal file
|
@ -0,0 +1,309 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Contextual</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, contextual ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.col-sm-12.col-sm-last.col-md-12.col-md-normal { box-sizing: border-box; border-bottom: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-12.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
.toast.demo { position: relative; top: 2rem; left: calc(50% - 6rem); z-index: 1;} .toast.demo.small { top: 4.5rem; left: calc(50% - 6.75rem);} .toast.demo.large { top: 7.5rem; left: calc(50% - 8rem);}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="contextual-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Contextual</h1>
|
||||||
|
<p style="text-align:justify">The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Almost every website present on the web has some sort of content that needs highlighting in one way or another. The <strong>contextual</strong> module provides you with simple semantic text highlighting that utilises the <code><mark></code> HTML element. Apart from that, this module contains styles and definitions for a simple <code>.toast</code> container, that you can use to display toast messages on your websites and web apps. Toasts mimic the native application notifications of certain devices, making them mobile friendly. Finally, a simple accessible <code>.tooltip</code> implementation is included along with an implementation for <code>.modal</code> dialogs. All components in this module are fully accessible, so that's another thing not to worry about.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>contextual</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="text-highlighting">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Text highlighting</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<p>This is some text with a <mark>highlight</mark>.</p>
|
||||||
|
<p>Apart from the primary highlight style, there are also <mark class="secondary">secondary</mark> and <mark class="tertiary">tertiary</mark> styles for highlighting.</p><br>
|
||||||
|
<p><mark class="inline-block">If you want to highlight a longer piece of text, without line breaks, you can turn the highlight into an inline-block like you see this piece of text being displayed.</mark></p><br>
|
||||||
|
<p>Finally, you can create contextual tags like <mark class="tag">this</mark> or <mark class="tag">7</mark>.</p><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">To add simple highlights in your text, you can use the <code><mark></code> HTML element. These highlights come pre-styled to use the default primary color, but if you would rather use another color for your highlight you can easily add the <code>.secondary</code> or <code>.tertiary</code> class to a <code><mark></code> element. For longer pieces of text that need highlighting, consider adding the <code>.inline-block</code> class to make them stand out even more. Finally, you can create contextual tags, using the <code>.tag</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><mark>primary</mark>
|
||||||
|
<mark class="secondary">secondary</mark>
|
||||||
|
<mark class="tertiary">tertiary</mark>
|
||||||
|
<mark class="inline-block">long highlight text...</mark>
|
||||||
|
<mark class="tag">tag</mark></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Try to use elements with the <code>.inline-block</code> class only when absolutely necessary, as they break the normal text flow of the document. Avoid using this class on shorter pieces of text that span a few words and contain no line breaks.</li>
|
||||||
|
<li><code><mark></code> elements, along with their supporting classes (except for <code>.inline-block</code>) can be easily used in paragraphs, headings and other elements, as they scale according to their parent element.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><mark class="tag tertiary">green tag</mark>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<mark class="inline-block secondary">red chunk</mark></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can combine any of the contextual color classes (<code>.secondary</code> or <code>.tertiary</code>) with the <code>.tag</code> or <code>.inline-block</code> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><mark class="secondary tertiary">no, no</mark>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<mark class="inline-block tag">oh, no</mark></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining two contextual color classes or a <code>.tag</code> and an <code>.inline-block</code>, as these combinations might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><mark class="inline-block">some
|
||||||
|
<mark class="secondary">text</mark>
|
||||||
|
</mark></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can only nest a <code><mark></code> inside another if the outer one is of the <code>.inline-block</code> class. You can color the inner <code><mark></code> using any of the contextual color classes or even make it a <code>.tag</code>. Be careful, however, to not make the inner <code><mark></code> an <code>.inline-block</code> as well.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><mark>some
|
||||||
|
<mark class="secondary">text</mark>
|
||||||
|
</mark></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid using nested <code><mark></code> elements, unless the outer <code><mark></code> element is an <code>.inline-block</code>.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="toasts">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Toasts</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div style="height: 15rem;">
|
||||||
|
<span class="toast demo">I'm a toast message!</span><br/>
|
||||||
|
<span class="toast small demo">I'm a small toast message!</span><br/>
|
||||||
|
<span class="toast large demo">I'm a large toast message!</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align:justify">Toasts aim to help bridge the gap between web and native applications on mobile devices, by displaying native-looking toast messages. To create a toast, wrap some text inside a <code><span></code> element with the <code>.toast</code> class. Toasts appear at the bottom of the screen on top of everything else. If you want to create smaller or larger toast messasges, you can add the <code>.small</code> or <code>.large</code> classes respectively.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="toast">This is a normal toast message!</span>
|
||||||
|
<span class="toast small">This is a large toast message!</span>
|
||||||
|
<span class="toast large">This is a small toast message!</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Toast elements do not have any pre-defined behavior. You should use your own Javascript code and interactive HTML elements to deal with showing and hiding them as necessary.</li>
|
||||||
|
<li>If you want to create your own color or size variants for toast messages, check out the <a href="customization">customization</a> page.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><span class="toast small large">Not a good toast</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining two toast size variants, as this might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="tooltips">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Tooltips</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br /><p class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</p><br />
|
||||||
|
<p class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</p><br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Tooltips can be used to convey context-sensitive information when the user hovers over some text. To create a tooltip, simply wrap the text you want users to hover over in an element with the <code>.tooltip</code> class (our choice is usually a <code><span></code> element, but your needs may differ) and add an <code><span class="fore-secondary">aria-label</span></code> in that element, setting its value to the content of your tooltip. Tooltips display at the top of the hovered text by default, so if you want to show them below the text, add the <code>.bottom</code> class to them.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</span>
|
||||||
|
<span class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Tooltips are built to be accessible and should display properly on screenreaders.</li>
|
||||||
|
<li>If you are not satisfied with the default tooltip colors, please check out the <a href="customization">customization page</a> for instuctions on how to create your own tooltip variants.</li>
|
||||||
|
<li>Remember to always add the <code><span class="fore-secondary">aria-label</span></code> attribute, otherwise your tooltip will not have any text to show.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="modals">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Modals</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div style="text-align:center"><br/>
|
||||||
|
<label class="button primary large" for="modal-check">Click to display a modal dialog</label><br/><br/>
|
||||||
|
<input id="modal-check" type="checkbox"/>
|
||||||
|
<div class="modal" style="text-align:initial">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-check" class="close"></label>
|
||||||
|
<h3 class="section double-padded">Modal</h3>
|
||||||
|
<div class="section double-padded">
|
||||||
|
<p>This is a modal window!</p>
|
||||||
|
<label class="button primary" for="modal-check">Close modal</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Modal dialogs are pretty ease to make. Simply create an <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> element, immediately followed by a <code><div></code> element with the <code>.modal</code> class. Inside this element, you can add a <code>.card</code> element with your modal dialog's contents. Remember to add a <code><label></code> element linked to your modal dialog's <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> to let users close the dialog. You can also apply the <code>.close</code> class to a <code><label></code> element to display a close icon at the top right of the modal dialog.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><label for="modal-toggle">Show modal</label>
|
||||||
|
|
||||||
|
<input id="modal-toggle" type="checkbox"/>
|
||||||
|
<div class="modal">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-toggle" class="close"></label>
|
||||||
|
<h3 class="section">Modal</h3>
|
||||||
|
<p class="section">This is a modal window!</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>You can use any styles you want from the <strong><a href="card">card</a></strong> module to create different dialogs based on context (e.g. alerts, warnings etc.).</li>
|
||||||
|
<li>Remember to add a <code><label></code> linked to your modal dialog's <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> or use Javascript to alter its state, otherwise users will not be able to close the dialog.</li>
|
||||||
|
<li>You can place your modal dialog anywhere on your page, as long as the structure is not altered. You can also toggle it from anywhere on a page.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><input id="modal-toggle" type="checkbox"/>
|
||||||
|
<label for="modal-toggle">Show modal</label>
|
||||||
|
<div class="modal" role="dialog" aria-labelledby="dialogTitle">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-toggle" class="close"></label>
|
||||||
|
<h3 class="section" id="dialogTitle">Bad Modal</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can use the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_dialog_role">dialog</a>"</span></code> to add accessibility to your modal dialogs. Remember to properly label it and manage keyboard focus, as required.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><input id="modal-toggle" type="checkbox"/>
|
||||||
|
<label for="modal-toggle">Show modal</label>
|
||||||
|
<div class="modal">
|
||||||
|
<div class="card">
|
||||||
|
<label for="modal-toggle" class="close"></label>
|
||||||
|
<h3 class="section">Bad Modal</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The syntax and structure of the modal dialog's container is very strict. Try to follow it exactly as described in this section.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
255
docs/v2/core.html~HEAD
Normal file
255
docs/v2/core.html~HEAD
Normal file
|
@ -0,0 +1,255 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Core</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, core ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
|
||||||
|
.box-centered { text-align: center; } .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd; } }
|
||||||
|
@media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="core-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Core</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Before applying any typography and styling rules, some resets need to be applied to make sure that different elements display consistently on all browsers. The <strong>core</strong> module utilizes the ruleset of <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0 to apply those much needed resets and fixes. However, to keep the framework small, we removed some rules that only help with legacy browser support and also tweaked a lot of the rules around to use customizable variables so no duplicate rules are applied, taking up unnecessary space. The typography rules in <strong>core</strong> deal with a page's basics, like fonts and styling of headings and paragraphs, horizontal rules, colors, margins, padding etc.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>core</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre>
|
||||||
|
<figure style="margin: 0;" class="hidden-sm"><div style="position: relative; padding: 0.5rem; padding-bottom: 42%; margin-bottom: 0.25rem; margin-right: 1rem;"><iframe style="display: none; border: 0; position: absolute; width: 100%; height: 100%;" onload="this.style.display='block';" src="https://scrimba.com/cast/cast-1949.embed"></iframe></div><figcaption style="padding: 0.5rem;">Intro to mini.css by <a href="https://scrimba.com/casts/cast-1949" style="font-size: 0.8125rem; text-decoration: none;">Per Harald Borgen</a></figcaption></figure><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="typography">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Typography</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">For the basic typography rules we did the following, along with other things presented below:</p>
|
||||||
|
<ul>
|
||||||
|
<li>We use a <a href="https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/">native font stack</a> to figure out the best font for your device.</li>
|
||||||
|
<li>We set the colors to <code>background: #f8f8f8;</code> and <code>color: #212121;</code>.</li>
|
||||||
|
<li>We use a <code>font-size</code> of <code>16px</code> for the root element.</li>
|
||||||
|
<li>We set <code>line-height</code> to <code>1.5</code>.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Fluid typography is also included, but not enabled by default. If you want to try it out, check out the out the <a href="customization">customization</a> page.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="headings">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Headings</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal row">
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-first"><h1>Heading 1<small>Subheading</small></h1></div>
|
||||||
|
<div class="col-sm-12 col-lg-6"><h2>Heading 2<small>Subheading</small></h2></div>
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-last"><h3>Heading 3<small>Subheading</small></h3></div>
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-first"><h4>Heading 4<small>Subheading</small></h4></div>
|
||||||
|
<div class="col-sm-12 col-lg-6"><h5>Heading 5<small>Subheading</small></h5></div>
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-last"><h6>Heading 6<small>Subheading</small></h6></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">All six of the HTML headings (<code><h1></code> - <code><h6></code>) are styled with simple rules, providing a clean base for your pages' headings. Apart from the headings themselves, complementary rules are provided for <code><small></code> elements inside headings, allowing you to define subheadings or explanatory text for those headings. These subheadings are stylized to display below the headings in smaller, lighter type.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><h1>Heading 1<small>Subheading</small></h1>
|
||||||
|
<h2>Heading 2<small>Subheading</small></h2>
|
||||||
|
<h3>Heading 3<small>Subheading</small></h3>
|
||||||
|
<h4>Heading 4<small>Subheading</small></h4>
|
||||||
|
<h5>Heading 5<small>Subheading</small></h5>
|
||||||
|
<h6>Heading 6<small>Subheading</small></h6></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="common-textual-elements">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Common textual elements</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div><p>This is a paragraph with some sample text. Did you know <strong>mini.css</strong> v2 is codenamed <strong>Fermion</strong>? No? Well, now you do! Oh, by the way, that was some Bold text and here is some <em>text in Italics</em>. Maybe you want to know what our inline elements look like. For example a <a href="https://github.com/Chalarangelo/mini.css">link to the Github repository of mini.css</a> looks like that! Neat, right? Maybe you want to see some <code>inline code</code> or some sample <kbd>input</kbd>. Oh, also <small>small text</small> is cool, along with its siblings: the subscript<sub>hi!</sub> and the superscript<sup>hello!</sup>. Finally, check out the horizontal rule, preformatted code block and quotation below.</p><hr>
|
||||||
|
<pre>function sum(num1, num2) {
|
||||||
|
var num3 = num1 + num2;
|
||||||
|
console.log('Result: ' + num3);
|
||||||
|
}</pre>
|
||||||
|
<blockquote cite="https://www.google.com">This is some quoted text from elsewhere.</blockquote><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The most common HTML5 elements must be things like <code><p></code>aragraphs, bold (<code><strong></code>) & italics (<code><em></code>) text, links (<code><a></code>), horizontal rules (<code><hr></code>) and <code><small></code> text. These, along with a few others, are styled by default using clean, modern design to make your pages look cool and stand out from the rest of the internet.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
|
||||||
|
<a href="#">This is a link.</a>
|
||||||
|
<small>This is some small text.</small>
|
||||||
|
<sub>Subscript</sub>
|
||||||
|
<sup>Superscript</sup>
|
||||||
|
<code>Inline code</code>
|
||||||
|
<kbd>Keyboard Input</kbd>
|
||||||
|
<hr>
|
||||||
|
<pre>This is some preformatted text.</pre>
|
||||||
|
<blockquote cite="www.quotation.source">
|
||||||
|
This is some quoted text from another website or person.
|
||||||
|
</blockquote></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="lists">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Lists</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<ul>
|
||||||
|
<li>Apple</li>
|
||||||
|
<li>Orange</li>
|
||||||
|
<li>Strawberry</li>
|
||||||
|
</ul><br>
|
||||||
|
<ol>
|
||||||
|
<li>Wake up</li>
|
||||||
|
<li>Eat breakfast</li>
|
||||||
|
<li>Go to work</li>
|
||||||
|
</ol><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Lists are also very commonly used in websites and apps. We tweaked a few margins and paddings to save some space and make them align properly with the rest of the common HTML elements that we use, but both unordered lists (<code><ul></code>) and ordered lists (<code><ol></code>) are minimally pre-styled to make things a little bit easier for you.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><ul>
|
||||||
|
<li>Apple</li>
|
||||||
|
<li>Orange</li>
|
||||||
|
<li>Strawberry</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>Wake up</li>
|
||||||
|
<li>Eat breakfast</li>
|
||||||
|
<li>Go to work</li>
|
||||||
|
</ol></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="images-captions">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Image responsiveness & captions</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div><figure><img src="https://placehold.it/800x600" alt="image"><figcaption>Image caption</figcaption></figure></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Image elements (<code><img></code>) are responsive by default, without the need for any special classes or anything else. We made sure they will scale down as necessary to display properly on smaller devices, while keeping their original aspect ratio, but they will never scale up above their original size.</p> <p>On a side note, if you want to add captions to images, you can use a <code><figcaption></code> element, while wrapping both the image and it inside a <code><figure></code>.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><figure>
|
||||||
|
<img src="...">
|
||||||
|
<figcaption>Image caption</figcaption>
|
||||||
|
</figure></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
255
docs/v2/core.html~gluon.v3
Normal file
255
docs/v2/core.html~gluon.v3
Normal file
|
@ -0,0 +1,255 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Core</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, core ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
|
||||||
|
.box-centered { text-align: center; } .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd; } }
|
||||||
|
@media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="core-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Core</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Before applying any typography and styling rules, some resets need to be applied to make sure that different elements display consistently on all browsers. The <strong>core</strong> module utilizes the ruleset of <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0 to apply those much needed resets and fixes. However, to keep the framework small, we removed some rules that only help with legacy browser support and also tweaked a lot of the rules around to use customizable variables so no duplicate rules are applied, taking up unnecessary space. The typography rules in <strong>core</strong> deal with a page's basics, like fonts and styling of headings and paragraphs, horizontal rules, colors, margins, padding etc.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>core</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre>
|
||||||
|
<figure style="margin: 0;" class="hidden-sm"><div style="position: relative; padding: 0.5rem; padding-bottom: 42%; margin-bottom: 0.25rem; margin-right: 1rem;"><iframe style="display: none; border: 0; position: absolute; width: 100%; height: 100%;" onload="this.style.display='block';" src="https://scrimba.com/cast/cast-1949.embed"></iframe></div><figcaption style="padding: 0.5rem;">Intro to mini.css by <a href="https://scrimba.com/casts/cast-1949" style="font-size: 0.8125rem; text-decoration: none;">Per Harald Borgen</a></figcaption></figure><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="typography">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Typography</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">For the basic typography rules we did the following, along with other things presented below:</p>
|
||||||
|
<ul>
|
||||||
|
<li>We use a <a href="https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/">native font stack</a> to figure out the best font for your device.</li>
|
||||||
|
<li>We set the colors to <code>background: #f8f8f8;</code> and <code>color: #212121;</code>.</li>
|
||||||
|
<li>We use a <code>font-size</code> of <code>16px</code> for the root element.</li>
|
||||||
|
<li>We set <code>line-height</code> to <code>1.5</code>.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Fluid typography is also included, but not enabled by default. If you want to try it out, check out the out the <a href="customization">customization</a> page.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="headings">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Headings</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal row">
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-first"><h1>Heading 1<small>Subheading</small></h1></div>
|
||||||
|
<div class="col-sm-12 col-lg-6"><h2>Heading 2<small>Subheading</small></h2></div>
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-last"><h3>Heading 3<small>Subheading</small></h3></div>
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-first"><h4>Heading 4<small>Subheading</small></h4></div>
|
||||||
|
<div class="col-sm-12 col-lg-6"><h5>Heading 5<small>Subheading</small></h5></div>
|
||||||
|
<div class="col-sm-12 col-lg-6 col-lg-last"><h6>Heading 6<small>Subheading</small></h6></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">All six of the HTML headings (<code><h1></code> - <code><h6></code>) are styled with simple rules, providing a clean base for your pages' headings. Apart from the headings themselves, complementary rules are provided for <code><small></code> elements inside headings, allowing you to define subheadings or explanatory text for those headings. These subheadings are stylized to display below the headings in smaller, lighter type.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><h1>Heading 1<small>Subheading</small></h1>
|
||||||
|
<h2>Heading 2<small>Subheading</small></h2>
|
||||||
|
<h3>Heading 3<small>Subheading</small></h3>
|
||||||
|
<h4>Heading 4<small>Subheading</small></h4>
|
||||||
|
<h5>Heading 5<small>Subheading</small></h5>
|
||||||
|
<h6>Heading 6<small>Subheading</small></h6></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="common-textual-elements">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Common textual elements</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div><p>This is a paragraph with some sample text. Did you know <strong>mini.css</strong> v2 is codenamed <strong>Fermion</strong>? No? Well, now you do! Oh, by the way, that was some Bold text and here is some <em>text in Italics</em>. Maybe you want to know what our inline elements look like. For example a <a href="https://github.com/Chalarangelo/mini.css">link to the Github repository of mini.css</a> looks like that! Neat, right? Maybe you want to see some <code>inline code</code> or some sample <kbd>input</kbd>. Oh, also <small>small text</small> is cool, along with its siblings: the subscript<sub>hi!</sub> and the superscript<sup>hello!</sup>. Finally, check out the horizontal rule, preformatted code block and quotation below.</p><hr>
|
||||||
|
<pre>function sum(num1, num2) {
|
||||||
|
var num3 = num1 + num2;
|
||||||
|
console.log('Result: ' + num3);
|
||||||
|
}</pre>
|
||||||
|
<blockquote cite="https://www.google.com">This is some quoted text from elsewhere.</blockquote><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The most common HTML5 elements must be things like <code><p></code>aragraphs, bold (<code><strong></code>) & italics (<code><em></code>) text, links (<code><a></code>), horizontal rules (<code><hr></code>) and <code><small></code> text. These, along with a few others, are styled by default using clean, modern design to make your pages look cool and stand out from the rest of the internet.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><p>This is a paragraph with some <strong>bold text</strong> and some <em>italics text</em>.</p>
|
||||||
|
<a href="#">This is a link.</a>
|
||||||
|
<small>This is some small text.</small>
|
||||||
|
<sub>Subscript</sub>
|
||||||
|
<sup>Superscript</sup>
|
||||||
|
<code>Inline code</code>
|
||||||
|
<kbd>Keyboard Input</kbd>
|
||||||
|
<hr>
|
||||||
|
<pre>This is some preformatted text.</pre>
|
||||||
|
<blockquote cite="www.quotation.source">
|
||||||
|
This is some quoted text from another website or person.
|
||||||
|
</blockquote></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="lists">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Lists</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<ul>
|
||||||
|
<li>Apple</li>
|
||||||
|
<li>Orange</li>
|
||||||
|
<li>Strawberry</li>
|
||||||
|
</ul><br>
|
||||||
|
<ol>
|
||||||
|
<li>Wake up</li>
|
||||||
|
<li>Eat breakfast</li>
|
||||||
|
<li>Go to work</li>
|
||||||
|
</ol><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Lists are also very commonly used in websites and apps. We tweaked a few margins and paddings to save some space and make them align properly with the rest of the common HTML elements that we use, but both unordered lists (<code><ul></code>) and ordered lists (<code><ol></code>) are minimally pre-styled to make things a little bit easier for you.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><ul>
|
||||||
|
<li>Apple</li>
|
||||||
|
<li>Orange</li>
|
||||||
|
<li>Strawberry</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>Wake up</li>
|
||||||
|
<li>Eat breakfast</li>
|
||||||
|
<li>Go to work</li>
|
||||||
|
</ol></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="images-captions">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Image responsiveness & captions</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div><figure><img src="https://placehold.it/800x600" alt="image"><figcaption>Image caption</figcaption></figure></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Image elements (<code><img></code>) are responsive by default, without the need for any special classes or anything else. We made sure they will scale down as necessary to display properly on smaller devices, while keeping their original aspect ratio, but they will never scale up above their original size.</p> <p>On a side note, if you want to add captions to images, you can use a <code><figcaption></code> element, while wrapping both the image and it inside a <code><figure></code>.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><figure>
|
||||||
|
<img src="...">
|
||||||
|
<figcaption>Image caption</figcaption>
|
||||||
|
</figure></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
126
docs/v2/customization/index.html~HEAD
Normal file
126
docs/v2/customization/index.html~HEAD
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="../mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Customization</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, customization, flavor ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {box-sizing: border-box; border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 1279px){.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored { color: #f5f5f5;} @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="../index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="../index" class="button hidden-sm">Introduction</a> <a href="../modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="../flavors" class="button hidden-sm">Flavors</a> <a href="../templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="../customization" class="button hidden-sm">Customization</a> <a href="../quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="../index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<a href="../modules"><h4 style="margin-left: 0;">Modules</h4></a>
|
||||||
|
<a href="../flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="../templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Customization</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography-headings" class="sublink-1">Typography & headings</a>
|
||||||
|
<a href="core#common-elements" class="sublink-1">Common elements & fixes</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#classes-breakpoints" class="sublink-1">Classes & breakpoints</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switch" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#button-mixins" class="sublink-1">Button mixins</a> <a href="input_control#switch-mixins" class="sublink-1">Switch mixins</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a>
|
||||||
|
<a href="navigation#drawer" class="sublink-1">Drawer</a> <a href="navigation#footer" class="sublink-1">Footer</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#table-styling" class="sublink-1">Table styling</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#cards-sections" class="sublink-1">Cards and sections</a> <a href="card#card-mixins" class="sublink-1">Card mixins</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#tab-styling" class="sublink-1">Tab styling</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<a href="contextual#highlighting-mixins" class="sublink-1">Text highlighting mixins</a>
|
||||||
|
<a href="contextual#toast-mixins" class="sublink-1">Toast mixins</a> <a href="contextual#tooltip-mixins" class="sublink-1">Tooltip mixins</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#progress-bar" class="sublink-1">Progress bar</a> <a href="progress#donut-spinner" class="sublink-1">Donut spinner</a>
|
||||||
|
<a href="progress#progress-mixins" class="sublink-1">Progress bar mixins</a> <a href="progress#spinner-mixins" class="sublink-1">Donut spinner mixins</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-legacy" class="sublink-1">Visibility helpers & legacy features</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="utility#borders-shadows-mixins" class="sublink-1">Generic border & shadow mixins</a>
|
||||||
|
<a href="utility#responsive-sizing-mixins" class="sublink-1">Responsive sizing & spacing mixins</a>
|
||||||
|
<a href="utility#responsive-visibility-mixins" class="sublink-1">Responsive visibility helper mixins</a>
|
||||||
|
<a href="../quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Customization</h1>
|
||||||
|
<p style="text-align:justify"><strong>mini.css</strong> is built in such a way that customization is really simple. You could try out one of the <a href="../flavors">pre-defined flavors</a>, if you want, in order to get used to the framework and build something quickly and easily. However, many projects require custom styles and color palettes, which is when you need to get your hands dirty and start creating your own flavor by customizing an existing one and using mixins and variables to create your own, unique style for your brand or product. This page, along with the rest of the <strong>Customization</strong> section is aimed at developers who want to tweak the code provided with <strong>mini.css</strong> to create their own flavors for their projects, as well as active maintainers of the framework and people who just want to understand the inner workings of the codebase.</p>
|
||||||
|
<p style="text-align:justify">Use the menu to quickly jump to the documentation of any module that you want to check out. We strongly recommend, however, that you read the general information provided in this page before you start exploring the modules' code, especially if you are not familiar with the way <strong>mini.css</strong> is structured.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<br/>
|
||||||
|
<h2>Introduction & basics</h2>
|
||||||
|
<p style="text-align:justify"><strong>mini.css</strong> is written using <a href="http://sass-lang.com/">Sass</a>, a very popular CSS preprocessor. We use Sass to do four things:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Make the code modular</li>
|
||||||
|
<li>Create variables that can be changed on the fly</li>
|
||||||
|
<li>Optimize the code</li>
|
||||||
|
<li>Create reusable mixins</li>
|
||||||
|
</ul><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Modules & file structure</h3>
|
||||||
|
<p style="text-align:justify">At the heart of <strong>mini.css</strong> are modules - groups of classes and styles that aim to solve one set of needs. There are 10 modules in <strong>mini.css</strong>, which have been already written for you. All of the modules are built using partial files, named <code>_module_name.scss</code> and placed in the <code>src/mini</code> folder. You can edit any of the modules' code and/or add your own modules, following the same structure. The only thing you need to remember to do, in order to add your module to your flavor, is to add an <code>@import</code> statement after all the required variable declarations towards the bottom of your flavor file and it will be compiled along with the rest of <strong>mini.css</strong>. Similarly, to disable a module, just comment out its <code>@import</code> statement from the flavor file.</p><br/>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Variables</h3>
|
||||||
|
<p style="text-align:justify">Everything in <strong>mini.css</strong> is based on Sass variables. We try to make our variable names as descriptive as possible, usually using names like <code>$block-element-property-name</code>, but some things might vary a little bit. Changing the values of variables should be reasonably easy, simply navigate to the <code>src/flavors/flavor-name.scss</code> file for a pre-defined flavor and you will see a list of variables that you can tweak. Change the values as you see fit and your finalized stylesheet will reflect the changes you have made. We did our best to make everything as customizable as possible, so that different people can build entirely different flavors using the same building blocks.</p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Code optimization</h3>
|
||||||
|
<p style="text-align:justify">Building <strong>mini.css</strong> was no small task. Making it lightweight and customizable made things even harder, because these two things don't go well together most of the time. What we did was put more of the load on the preprocessor, instead of the final file. In order to accomplish this, we optimized as much of the code as possible, using conditions, flags and other tricks, so that compiling a flavor file might take one second longer, but loading won't. If you add any code to a flavor yourself, remember not only to make it customizable, but also to optimize it as best as possible.</p><br/>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Mixins</h3>
|
||||||
|
<p style="text-align:justify">A lot of elements and components can be styled in many ways and most of the time we want a few styles to be available, without having to rewrite everything. We utilized the <code>@mixin</code> directive of Sass wherever we could to make it possible for you to easily create styles for pre-existing components and elements without having to tweak the base code for said elements or components. Each module's mixins can be found in the corresponding <code>_module_name_mixins.scss</code> file in the <code>src/mini</code> folder. To use a mixin, simply <code>@import</code> its file and then <code>@include</code> the mixin itself, passing values to at least its mandatory parameters. We recommend you write mixins wherever possible, if you create any new modules for <strong>mini.css</strong>.</p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">To read more about the inner workings of <strong>mini.css</strong>, please choose a module from the menu to view its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered"><div class="col-sm-12"></div></div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
126
docs/v2/customization/index.html~gluon.v3
Normal file
126
docs/v2/customization/index.html~gluon.v3
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="../mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Customization</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, customization, flavor ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {box-sizing: border-box; border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 1279px){.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored { color: #f5f5f5;} @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="../index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="../index" class="button hidden-sm">Introduction</a> <a href="../modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="../flavors" class="button hidden-sm">Flavors</a> <a href="../templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="../customization" class="button hidden-sm">Customization</a> <a href="../quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="../index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<a href="../modules"><h4 style="margin-left: 0;">Modules</h4></a>
|
||||||
|
<a href="../flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="../templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Customization</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography-headings" class="sublink-1">Typography & headings</a>
|
||||||
|
<a href="core#common-elements" class="sublink-1">Common elements & fixes</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#classes-breakpoints" class="sublink-1">Classes & breakpoints</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switch" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#button-mixins" class="sublink-1">Button mixins</a> <a href="input_control#switch-mixins" class="sublink-1">Switch mixins</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a>
|
||||||
|
<a href="navigation#drawer" class="sublink-1">Drawer</a> <a href="navigation#footer" class="sublink-1">Footer</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#table-styling" class="sublink-1">Table styling</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#cards-sections" class="sublink-1">Cards and sections</a> <a href="card#card-mixins" class="sublink-1">Card mixins</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#tab-styling" class="sublink-1">Tab styling</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<a href="contextual#highlighting-mixins" class="sublink-1">Text highlighting mixins</a>
|
||||||
|
<a href="contextual#toast-mixins" class="sublink-1">Toast mixins</a> <a href="contextual#tooltip-mixins" class="sublink-1">Tooltip mixins</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#progress-bar" class="sublink-1">Progress bar</a> <a href="progress#donut-spinner" class="sublink-1">Donut spinner</a>
|
||||||
|
<a href="progress#progress-mixins" class="sublink-1">Progress bar mixins</a> <a href="progress#spinner-mixins" class="sublink-1">Donut spinner mixins</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-legacy" class="sublink-1">Visibility helpers & legacy features</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="utility#borders-shadows-mixins" class="sublink-1">Generic border & shadow mixins</a>
|
||||||
|
<a href="utility#responsive-sizing-mixins" class="sublink-1">Responsive sizing & spacing mixins</a>
|
||||||
|
<a href="utility#responsive-visibility-mixins" class="sublink-1">Responsive visibility helper mixins</a>
|
||||||
|
<a href="../quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Customization</h1>
|
||||||
|
<p style="text-align:justify"><strong>mini.css</strong> is built in such a way that customization is really simple. You could try out one of the <a href="../flavors">pre-defined flavors</a>, if you want, in order to get used to the framework and build something quickly and easily. However, many projects require custom styles and color palettes, which is when you need to get your hands dirty and start creating your own flavor by customizing an existing one and using mixins and variables to create your own, unique style for your brand or product. This page, along with the rest of the <strong>Customization</strong> section is aimed at developers who want to tweak the code provided with <strong>mini.css</strong> to create their own flavors for their projects, as well as active maintainers of the framework and people who just want to understand the inner workings of the codebase.</p>
|
||||||
|
<p style="text-align:justify">Use the menu to quickly jump to the documentation of any module that you want to check out. We strongly recommend, however, that you read the general information provided in this page before you start exploring the modules' code, especially if you are not familiar with the way <strong>mini.css</strong> is structured.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<br/>
|
||||||
|
<h2>Introduction & basics</h2>
|
||||||
|
<p style="text-align:justify"><strong>mini.css</strong> is written using <a href="http://sass-lang.com/">Sass</a>, a very popular CSS preprocessor. We use Sass to do four things:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Make the code modular</li>
|
||||||
|
<li>Create variables that can be changed on the fly</li>
|
||||||
|
<li>Optimize the code</li>
|
||||||
|
<li>Create reusable mixins</li>
|
||||||
|
</ul><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Modules & file structure</h3>
|
||||||
|
<p style="text-align:justify">At the heart of <strong>mini.css</strong> are modules - groups of classes and styles that aim to solve one set of needs. There are 10 modules in <strong>mini.css</strong>, which have been already written for you. All of the modules are built using partial files, named <code>_module_name.scss</code> and placed in the <code>src/mini</code> folder. You can edit any of the modules' code and/or add your own modules, following the same structure. The only thing you need to remember to do, in order to add your module to your flavor, is to add an <code>@import</code> statement after all the required variable declarations towards the bottom of your flavor file and it will be compiled along with the rest of <strong>mini.css</strong>. Similarly, to disable a module, just comment out its <code>@import</code> statement from the flavor file.</p><br/>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Variables</h3>
|
||||||
|
<p style="text-align:justify">Everything in <strong>mini.css</strong> is based on Sass variables. We try to make our variable names as descriptive as possible, usually using names like <code>$block-element-property-name</code>, but some things might vary a little bit. Changing the values of variables should be reasonably easy, simply navigate to the <code>src/flavors/flavor-name.scss</code> file for a pre-defined flavor and you will see a list of variables that you can tweak. Change the values as you see fit and your finalized stylesheet will reflect the changes you have made. We did our best to make everything as customizable as possible, so that different people can build entirely different flavors using the same building blocks.</p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Code optimization</h3>
|
||||||
|
<p style="text-align:justify">Building <strong>mini.css</strong> was no small task. Making it lightweight and customizable made things even harder, because these two things don't go well together most of the time. What we did was put more of the load on the preprocessor, instead of the final file. In order to accomplish this, we optimized as much of the code as possible, using conditions, flags and other tricks, so that compiling a flavor file might take one second longer, but loading won't. If you add any code to a flavor yourself, remember not only to make it customizable, but also to optimize it as best as possible.</p><br/>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>Mixins</h3>
|
||||||
|
<p style="text-align:justify">A lot of elements and components can be styled in many ways and most of the time we want a few styles to be available, without having to rewrite everything. We utilized the <code>@mixin</code> directive of Sass wherever we could to make it possible for you to easily create styles for pre-existing components and elements without having to tweak the base code for said elements or components. Each module's mixins can be found in the corresponding <code>_module_name_mixins.scss</code> file in the <code>src/mini</code> folder. To use a mixin, simply <code>@import</code> its file and then <code>@include</code> the mixin itself, passing values to at least its mandatory parameters. We recommend you write mixins wherever possible, if you create any new modules for <strong>mini.css</strong>.</p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">To read more about the inner workings of <strong>mini.css</strong>, please choose a module from the menu to view its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered"><div class="col-sm-12"></div></div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
692
docs/v2/grid.html~HEAD
Normal file
692
docs/v2/grid.html~HEAD
Normal file
|
@ -0,0 +1,692 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Grid</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, grid ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;} }
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5; } @media (max-width: 767px){.container#co {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10#col{padding: 0 !important;}}
|
||||||
|
.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #c9c9c9;margin-bottom: 16px;padding-bottom: 12px;}
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-12.col-md-normal { border: 0; border-top: 1px solid #c9c9c9; margin-bottom: 0;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10" id="col"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="grid-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Grid</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>grid</strong> module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as <em>flexbox</em>). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Easy page layout is one of the main advantages of using a CSS framework over writing your own styles. The <strong>grid</strong> module utilizes the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a> to provide you with a modern and responsive layout grid system for all your needs. Rules in the <strong>grid</strong> module help you create basic fluid containers for your grid and allow you to design layouts that work well on all screen sizes using a simple row and column structure. The grid system contains definitions for both fluid columns that resize according to their siblings and columns with preset sizes on different screen sizes, as well as rules that allow you to offset or move certain columns to the first or last place on the grid's row on different devices, helping you present the page in a different layout without duplicating any content. All of the rules in the module are built around accessibility, so screen readers can easily read you pages.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>grid</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre>
|
||||||
|
<figure class="hidden-sm" style="margin: 0;"><div style="position: relative; padding: 0.5rem; padding-bottom: 42%; margin-bottom: 0.25rem; margin-right: 1rem;"><iframe style="display: none; border: 0; position: absolute; width: 100%; height: 100%;" onload="this.style.display='block';" src="https://scrimba.com/cast/cast-1972.embed"></iframe></div><figcaption style="padding: 0.5rem;">mini.css grids tutorial by <a href="https://scrimba.com/casts/cast-1972" style="font-size: 0.8125rem; text-decoration: none;">Per Harald Borgen</a></figcaption></figure><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="basic-layout">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic layout</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container"><br>
|
||||||
|
<div class="row"><div class="col-sm-1"><div class="box-colored">1</div></div><div class="col-sm-11"><div class="box-colored">11</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-2"><div class="box-colored">2</div></div><div class="col-sm-10"><div class="box-colored">10</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-3"><div class="box-colored">3</div></div><div class="col-sm-9"><div class="box-colored">9</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-4"><div class="box-colored">4</div></div><div class="col-sm-8"><div class="box-colored">8</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-5"><div class="box-colored">5</div></div><div class="col-sm-7"><div class="box-colored">7</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-6"><div class="box-colored">6</div></div><div class="col-sm-6"><div class="box-colored">6</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-12"><div class="box-colored">12</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored">fluid</div></div><div class="col-sm"><div class="box-colored">fluid</div></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">The grid system's basic layout is composed of three components, presented below in the order they should be added to the DOM tree:</p>
|
||||||
|
<ol style="text-align: justify;">
|
||||||
|
<li>The grid's <code>.container</code> is the outermost layer of your grid system. It is a fluid container that wraps the flexible grid system inside it.</li>
|
||||||
|
<li>Inside the container, <code>.row</code>s are added to specify each row of the grid layout. Rows serve to provide you with a simple basis for your layout's columns.</li>
|
||||||
|
<li>Finally, inside the rows, <code>.col-</code> elements are added for the columns. The columns are a little bit more complex than the container and rows, as they are what makes the layout respond to changes. There are two basic ways to define a column for your layout:
|
||||||
|
<ul>
|
||||||
|
<li>using <code>.col-<span class="fore-primary">SCR_SZ</span></code> to specify fluid columns, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens).</li>
|
||||||
|
<li>using <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> to specify columns with fixed width, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column (<code>1</code> meaning 1/12 of the width of the row and <code>12</code> meaning 100% of the width of the row).</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<p style="text-align: justify;">The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. Also, the example presented showcases the grid system's syntax for smaller screens, but you can do the same thing for any screen size.</p><br>
|
||||||
|
<div class="container"><div class="row"><div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="grid-base-sample">
|
||||||
|
<label for="grid-base-sample">Show sample code</label>
|
||||||
|
<div>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-1">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-11">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-3">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-5">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div></div></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li><strong>mini.css</strong> uses a mobile-first approach in its grid system. This means that specifying a layout for smaller device sizes will apply the same layout on medium-sized and larger screens, so you do not have to rewrite the same layout for all three screen sizes. However, if you want to change the layout on different screen sizes, check the section below.</li>
|
||||||
|
<li>The <strong>grid</strong> module is compatible with modern browsers, but might not display properly in older browsers.</li>
|
||||||
|
<li>The specific breakpoints for small, medium and large screen sizes are as follows:
|
||||||
|
<ul>
|
||||||
|
<li><strong>small</strong>: less than <code>768px</code> wide</li>
|
||||||
|
<li><strong>medium</strong>: more than or equal to <code>768px</code> wide but less than <code>1280px</code> wide</li>
|
||||||
|
<li><strong>large</strong>: <code>1280px</code> wide or more</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Fluid columns can be used for sizes that are not of the form <code>100%/12×<span class="fore-tertiary">X</span></code> where <code><span class="fore-tertiary">X</span></code> an integer value between <code>1</code> and <code>12</code>. For example, if you have 7 <code>.col-sm</code> elements in one row, each of the elements will have a width of 1/7th the width of the row.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="col-sm">
|
||||||
|
<div class="container">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<div class="col-sm">
|
||||||
|
<div class="row">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> A column can contain a container or a row inside it. The container can also be skipped if inside a column, so you only need to add a row.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="col-sm">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using columns inside columns without a row wrapping them. Either make the outer column a row in itself or wrap the inside columns in a row.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="col-sm row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> A column can also be a row at the same time, if you want to include sub-columns inside it. You can make the same element both a column in its own row and a row for its containing columns. The same idea can be applied for the container. Containers can, however, be omitted, when already inside a grid.</p>
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="row">
|
||||||
|
<p>Content without columns...</p>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using rows with content inside that is not wrapped in columns. Try to use a single <code>.col-sm</code> to wrap the content inside these, otherwise there might be unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> 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 with a total size of more than <code>12</code>, meaning with a total width of over 100%. The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
<p>Normal paragraph.</p>
|
||||||
|
</div>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
<p>Normal paragraph.</p>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid system. Always wrap content inside the proper containers (container, row or column) in your grid layout.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="screen-specific-layout">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Screen-specific layouts</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<div class="row"><div class="col-sm"><h4 style="text-align:center">Small screen layout</h4><hr></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-12"><div class="box-colored red" style="height: 45px;"></div></div><div class="col-sm-12"><div class="box-colored green" style="height: 120px;"></div></div><div class="col-sm-12"><div class="box-colored red" style="height: 45px;"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<div class="row"><div class="col-sm"><h4 style="text-align:center">Medium/Large screen layout</h4><hr></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-3"><div class="box-colored red" style="height: 282px;"></div></div><div class="col-sm-5"><div class="box-colored green" style="height: 282px;"></div></div><div class="col-sm-4"><div class="box-colored red" style="height: 282px;"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">You can specify different layouts for your pages and web apps, using the grid system's columns. To do this add classes to your columns for different screen sizes, using either the fluid column syntax (<code>.col-<span class="fore-primary">SCR_SZ</span></code>) or the fixed width column syntax (<code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code>) or even both.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-5 col-lg-7">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-4 col-lg-3">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Leaving a column's size unspecified for a resolution will use the style applied for the previous largest resolution recursively.</li>
|
||||||
|
<li>Changing the layout for different screen sizes can sometimes require complex content realignment, offsetting and reordering. For these features, check the sections below.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can radically change the layout of your content for different displays. Laying out your content vertically in <code>.col-sm-12</code>s for small devices and then compacting it to <code>.col-md-6</code>s for medium displays is pretty common. If your columns exceed a total size of <code>12</code> on some displays, they will wrap accordingly, so do not worry.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> If you want to place two columns side by side on some displays, but not on others (e.g. placing them vertically on smaller displays, then next to each other on medium-sized or larger displays), place them in one row, not multiple, otherwise you will not achieve the desired effect.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-lg-3">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-md-8">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> Specify only the screen-specific column sizes that you need. You can omit the medium-sized screens' size from a column if its layout on smaller screens is fluid or should be the same as in medium-sized displays. Or, if your larger screen layout is the same as your medium-sized screen layout, you can omit the class for the larger screen.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-md">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Never omit the class needed for the smallest screen size you have (<code>.col-sm</code> or <code>.col-sm-<span class="fore-secondary">COL_WD</span></code>), otherwise the column's layout on smaller displays might behave unexpectedly. You can, however, omit layout for the other two screen sizes if you want.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="predefined-layout">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Predefined layouts</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">Some simple grid layout problems can be solved using predefined layouts. To use a predefined layout, simply add a predefined layout class to a <code>.row</code> element. Predefined classes can be written using one of two syntaxes, similar to normal column classes:</p>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>fluid column layouts can be specified using <code>.cols-<span class="fore-primary">SCR_SZ</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names.</li>
|
||||||
|
<li>fixed width columns layouts can be specified using <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the columns.</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="row cols-sm-6">
|
||||||
|
<div>
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering.</li>
|
||||||
|
<li>If you use a fluid predefined layout, its columns will always be placed in one row.</li>
|
||||||
|
<li>Not specifying a predefined layout for a resolution will use the style applied for the previous largest resolution recursively.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row cols-sm-12 cols-md-6">
|
||||||
|
<div>
|
||||||
|
<p>col-sm-12, col-md-6</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p>col-sm-12, col-md-6</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row cols-sm-6">
|
||||||
|
<div class="row cols-sm-7">
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
<div class="row cols-sm-5">
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using the normal column classes in conjunction with predefined layouts, as they will most likely not apply and can sometimes cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="column-offset">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Column offsets</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container"><br>
|
||||||
|
<div class="row"><div class="col-sm-8 col-sm-offset-2"><div class="box-colored">size = 8, offset = 2</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-6 col-sm-offset-3"><div class="box-colored">size = 6, offset = 3</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-4 col-sm-offset-4"><div class="box-colored">size = 4, offset = 4</div></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 col-sm-offset-1"><div class="box-colored">size = 4, offset = 1</div></div>
|
||||||
|
<div class="col-sm-4 col-sm-offset-2"><div class="box-colored">size = 4, offset = 2</div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to move columns to the right, you can use the offset classes on your columns. Offset classes use the <code>.col-<span class="fore-primary">SCR_SZ</span>-offset-<span class="fore-secondary">COL_WD</span></code> syntax, where <code><span class="fore-primary">SCR_SZ</span></code> is one of the available screen size names (<code><span class="fore-tertiary">sm</span></code>, <code><span class="fore-tertiary">md</span></code> or <code><span class="fore-tertiary">lg</span></code>) and <code><span class="fore-secondary">COL_WD</span></code> a number from <code>0</code> to <code>11</code> specifying the width of the column's offset. Offsets can also be used in combination with screen-specific layouts and column sizes, providing you with greater flexibility when spacing out your content.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<p style="text-align: justify;">The example presented below showcases the grid system's offsetting syntax for smaller screens, but you can do the same thing for any screen size.</p>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-8 col-sm-offset-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 col-sm-offset-3">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 col-sm-offset-4">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm-offset-1">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 col-sm-offset-1">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4 col-sm-offset-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Columns with offsets and columns without offsets can be mixed for better results. In fact, we strongly suggest you try that.</li>
|
||||||
|
<li>Remember to specify a basic layout and/or screen specific layouts in addition to the offset classes.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-md-offset-1 col-md-5 col-lg-4">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm col-md-5 col-lg-4 col-lg-offset-2">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can specify offset classes when you need them and omit them otherwise. This means that, if you want to offset a column only on a medium-sized or a larger screen, you can just specify the offset for that specific screen. Specifying an offset for a smaller screen, however, will apply it to medium-sized and larger screens as well, medium-sized screen offsets will apply to larger screens etc. similar to how the layout system works.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-md-10 col-offset-1 col-lg col-lg-offset-0">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">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 use the <code>.col-<span class="fore-primary">SCR_SZ</span>-offset-0</code> class, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size, effectively resetting all offsets.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="column-reorder">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Column reordering</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row"><div class="col-sm"><br><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored red">first</div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
</div><div class="row"><div class="col-sm"><br><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored red">normal</div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
</div>
|
||||||
|
<div class="row"><div class="col-sm"><br><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored red">last</div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Additionally, if you want to reorder your columns, you can do that to some extent using the <code>.col-<span class="fore-primary">SCR_SZ</span>-first</code>, <code>.col-<span class="fore-primary">SCR_SZ</span>-last</code> and <code>.col-<span class="fore-primary">SCR_SZ</span>-normal</code> classes to your columns, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code>, <code><span class="fore-tertiary">md</span></code> or <code><span class="fore-tertiary">lg</span></code>). These classes will change the ordering of your columns appropriately to allow you to move content around any way you want (e.g. moving a navigation sidebar from the left of the content on larger displays to the end of the content on smaller displays).</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-md-last col-lg-normal">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-first col-md-normal">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm col-md-first col-lg-normal">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Columns are ordered by default in order of appearance. You should only apply column reordering classes to the columns you want to reorder on the screen-specific layouts you need them.</li>
|
||||||
|
<li>Remember to specify a basic layout and/or screen specific layouts in addition to the column reordering classes.</li>
|
||||||
|
<li>Column reordering is applied from smaller to larger screens, similar to how column layout and offsetting work.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-md-last">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm col-md-last">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use multiple <code>.col-<span class="fore-primary">SCR_SZ</span>-first</code>s and <code>.col-<span class="fore-primary">SCR_SZ</span>-last</code>s, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size, in the same row for the same screen size. If you specify more than one column to be first or last, the columns with the same order will be placed at the beggining or end of the row and the order between them will be determined based on their order of appearance in the DOM tree afterwards.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-last col-md-normal">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> To remove a previously applied reorder from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no reordering is active on a column, you can use the <code>.col-<span class="fore-primary">SCR_SZ</span>-normal</code> class, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size, effectively resetting all reorders. You do not, however, need to add this class to all other columns or use it when there are no reorders applied.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="media-object">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Media object pattern</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row"><div class="col-sm"><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm-2"><img src="https://placehold.it/800x600" alt="image"></div>
|
||||||
|
<div class="col-sm col-sm row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<h3>Media object heading</h3>
|
||||||
|
<p>This is an example implementation of the popular media object pattern, using simple grid rules.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">Last, but not least, you can use the grid system's classes to create a <a href="https://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/">media object</a> in one of many ways, based on your needs. The simplest way to implement a media object is using two columns, one for the media (i.e. <code><img></code>) and one for the textual content next to the media.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-1">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul>
|
||||||
|
<li>The media object is not a different component, but rather a popular pattern that can be implemented using the standard grid system classes.</li>
|
||||||
|
<li>You can use many different elements for your media object. For example, you can make the right side of the media object contain a form or an input field.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-1 col-md-2 col-lg-3">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-11 col-md-10 col-lg-9">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can make your media object responsive, by adding screen-specific layout classes to its columns.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-1 col-sm-last">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can align the media object's content to the left of the image (instead of the other way round), using the <code>.col-<span class="fore-primary">SCR_SZ</span>-normal</code> class, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Parent media object</h2>
|
||||||
|
<p>Parent media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Child media object</h2>
|
||||||
|
<p>Child media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> Media objects can be easily nested. You can use <code>.row</code> elements in the content column of the media object to make everything align perfectly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<img src="..." class="col-sm-1">
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Do not apply a column class directly to the media element (e.g.<code><img></code>) or the content of the media object, as this can cause problems with certain elements. Wrap your media objects columns in <code><div></code> elements and apply the grid classes to them, instead.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
692
docs/v2/grid.html~gluon.v3
Normal file
692
docs/v2/grid.html~gluon.v3
Normal file
|
@ -0,0 +1,692 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Grid</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, grid ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;} }
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5; } @media (max-width: 767px){.container#co {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10#col{padding: 0 !important;}}
|
||||||
|
.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #c9c9c9;margin-bottom: 16px;padding-bottom: 12px;}
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-12.col-md-normal { border: 0; border-top: 1px solid #c9c9c9; margin-bottom: 0;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10" id="col"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="grid-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Grid</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>grid</strong> module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as <em>flexbox</em>). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Easy page layout is one of the main advantages of using a CSS framework over writing your own styles. The <strong>grid</strong> module utilizes the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a> to provide you with a modern and responsive layout grid system for all your needs. Rules in the <strong>grid</strong> module help you create basic fluid containers for your grid and allow you to design layouts that work well on all screen sizes using a simple row and column structure. The grid system contains definitions for both fluid columns that resize according to their siblings and columns with preset sizes on different screen sizes, as well as rules that allow you to offset or move certain columns to the first or last place on the grid's row on different devices, helping you present the page in a different layout without duplicating any content. All of the rules in the module are built around accessibility, so screen readers can easily read you pages.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>grid</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre>
|
||||||
|
<figure class="hidden-sm" style="margin: 0;"><div style="position: relative; padding: 0.5rem; padding-bottom: 42%; margin-bottom: 0.25rem; margin-right: 1rem;"><iframe style="display: none; border: 0; position: absolute; width: 100%; height: 100%;" onload="this.style.display='block';" src="https://scrimba.com/cast/cast-1972.embed"></iframe></div><figcaption style="padding: 0.5rem;">mini.css grids tutorial by <a href="https://scrimba.com/casts/cast-1972" style="font-size: 0.8125rem; text-decoration: none;">Per Harald Borgen</a></figcaption></figure><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="basic-layout">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic layout</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container"><br>
|
||||||
|
<div class="row"><div class="col-sm-1"><div class="box-colored">1</div></div><div class="col-sm-11"><div class="box-colored">11</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-2"><div class="box-colored">2</div></div><div class="col-sm-10"><div class="box-colored">10</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-3"><div class="box-colored">3</div></div><div class="col-sm-9"><div class="box-colored">9</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-4"><div class="box-colored">4</div></div><div class="col-sm-8"><div class="box-colored">8</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-5"><div class="box-colored">5</div></div><div class="col-sm-7"><div class="box-colored">7</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-6"><div class="box-colored">6</div></div><div class="col-sm-6"><div class="box-colored">6</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-12"><div class="box-colored">12</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored">fluid</div></div><div class="col-sm"><div class="box-colored">fluid</div></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">The grid system's basic layout is composed of three components, presented below in the order they should be added to the DOM tree:</p>
|
||||||
|
<ol style="text-align: justify;">
|
||||||
|
<li>The grid's <code>.container</code> is the outermost layer of your grid system. It is a fluid container that wraps the flexible grid system inside it.</li>
|
||||||
|
<li>Inside the container, <code>.row</code>s are added to specify each row of the grid layout. Rows serve to provide you with a simple basis for your layout's columns.</li>
|
||||||
|
<li>Finally, inside the rows, <code>.col-</code> elements are added for the columns. The columns are a little bit more complex than the container and rows, as they are what makes the layout respond to changes. There are two basic ways to define a column for your layout:
|
||||||
|
<ul>
|
||||||
|
<li>using <code>.col-<span class="fore-primary">SCR_SZ</span></code> to specify fluid columns, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens).</li>
|
||||||
|
<li>using <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> to specify columns with fixed width, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column (<code>1</code> meaning 1/12 of the width of the row and <code>12</code> meaning 100% of the width of the row).</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<p style="text-align: justify;">The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. Also, the example presented showcases the grid system's syntax for smaller screens, but you can do the same thing for any screen size.</p><br>
|
||||||
|
<div class="container"><div class="row"><div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="grid-base-sample">
|
||||||
|
<label for="grid-base-sample">Show sample code</label>
|
||||||
|
<div>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-1">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-11">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-3">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-5">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div></div></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li><strong>mini.css</strong> uses a mobile-first approach in its grid system. This means that specifying a layout for smaller device sizes will apply the same layout on medium-sized and larger screens, so you do not have to rewrite the same layout for all three screen sizes. However, if you want to change the layout on different screen sizes, check the section below.</li>
|
||||||
|
<li>The <strong>grid</strong> module is compatible with modern browsers, but might not display properly in older browsers.</li>
|
||||||
|
<li>The specific breakpoints for small, medium and large screen sizes are as follows:
|
||||||
|
<ul>
|
||||||
|
<li><strong>small</strong>: less than <code>768px</code> wide</li>
|
||||||
|
<li><strong>medium</strong>: more than or equal to <code>768px</code> wide but less than <code>1280px</code> wide</li>
|
||||||
|
<li><strong>large</strong>: <code>1280px</code> wide or more</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Fluid columns can be used for sizes that are not of the form <code>100%/12×<span class="fore-tertiary">X</span></code> where <code><span class="fore-tertiary">X</span></code> an integer value between <code>1</code> and <code>12</code>. For example, if you have 7 <code>.col-sm</code> elements in one row, each of the elements will have a width of 1/7th the width of the row.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="col-sm">
|
||||||
|
<div class="container">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<div class="col-sm">
|
||||||
|
<div class="row">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> A column can contain a container or a row inside it. The container can also be skipped if inside a column, so you only need to add a row.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="col-sm">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using columns inside columns without a row wrapping them. Either make the outer column a row in itself or wrap the inside columns in a row.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="col-sm row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> A column can also be a row at the same time, if you want to include sub-columns inside it. You can make the same element both a column in its own row and a row for its containing columns. The same idea can be applied for the container. Containers can, however, be omitted, when already inside a grid.</p>
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="row">
|
||||||
|
<p>Content without columns...</p>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using rows with content inside that is not wrapped in columns. Try to use a single <code>.col-sm</code> to wrap the content inside these, otherwise there might be unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> 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 with a total size of more than <code>12</code>, meaning with a total width of over 100%. The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
<p>Normal paragraph.</p>
|
||||||
|
</div>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
<p>Normal paragraph.</p>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid system. Always wrap content inside the proper containers (container, row or column) in your grid layout.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="screen-specific-layout">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Screen-specific layouts</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<div class="row"><div class="col-sm"><h4 style="text-align:center">Small screen layout</h4><hr></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-12"><div class="box-colored red" style="height: 45px;"></div></div><div class="col-sm-12"><div class="box-colored green" style="height: 120px;"></div></div><div class="col-sm-12"><div class="box-colored red" style="height: 45px;"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<div class="row"><div class="col-sm"><h4 style="text-align:center">Medium/Large screen layout</h4><hr></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-3"><div class="box-colored red" style="height: 282px;"></div></div><div class="col-sm-5"><div class="box-colored green" style="height: 282px;"></div></div><div class="col-sm-4"><div class="box-colored red" style="height: 282px;"></div></div></div>
|
||||||
|
<div class="row"><div class="col-sm"><div class="box-colored"></div></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">You can specify different layouts for your pages and web apps, using the grid system's columns. To do this add classes to your columns for different screen sizes, using either the fluid column syntax (<code>.col-<span class="fore-primary">SCR_SZ</span></code>) or the fixed width column syntax (<code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code>) or even both.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-5 col-lg-7">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-4 col-lg-3">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Leaving a column's size unspecified for a resolution will use the style applied for the previous largest resolution recursively.</li>
|
||||||
|
<li>Changing the layout for different screen sizes can sometimes require complex content realignment, offsetting and reordering. For these features, check the sections below.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can radically change the layout of your content for different displays. Laying out your content vertically in <code>.col-sm-12</code>s for small devices and then compacting it to <code>.col-md-6</code>s for medium displays is pretty common. If your columns exceed a total size of <code>12</code> on some displays, they will wrap accordingly, so do not worry.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> If you want to place two columns side by side on some displays, but not on others (e.g. placing them vertically on smaller displays, then next to each other on medium-sized or larger displays), place them in one row, not multiple, otherwise you will not achieve the desired effect.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-lg-3">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-md-8">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> Specify only the screen-specific column sizes that you need. You can omit the medium-sized screens' size from a column if its layout on smaller screens is fluid or should be the same as in medium-sized displays. Or, if your larger screen layout is the same as your medium-sized screen layout, you can omit the class for the larger screen.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-md">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Never omit the class needed for the smallest screen size you have (<code>.col-sm</code> or <code>.col-sm-<span class="fore-secondary">COL_WD</span></code>), otherwise the column's layout on smaller displays might behave unexpectedly. You can, however, omit layout for the other two screen sizes if you want.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="predefined-layout">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Predefined layouts</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">Some simple grid layout problems can be solved using predefined layouts. To use a predefined layout, simply add a predefined layout class to a <code>.row</code> element. Predefined classes can be written using one of two syntaxes, similar to normal column classes:</p>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>fluid column layouts can be specified using <code>.cols-<span class="fore-primary">SCR_SZ</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names.</li>
|
||||||
|
<li>fixed width columns layouts can be specified using <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the columns.</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="row cols-sm-6">
|
||||||
|
<div>
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering.</li>
|
||||||
|
<li>If you use a fluid predefined layout, its columns will always be placed in one row.</li>
|
||||||
|
<li>Not specifying a predefined layout for a resolution will use the style applied for the previous largest resolution recursively.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row cols-sm-12 cols-md-6">
|
||||||
|
<div>
|
||||||
|
<p>col-sm-12, col-md-6</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p>col-sm-12, col-md-6</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row cols-sm-6">
|
||||||
|
<div class="row cols-sm-7">
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
<div class="row cols-sm-5">
|
||||||
|
<p>col-sm-6</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using the normal column classes in conjunction with predefined layouts, as they will most likely not apply and can sometimes cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="column-offset">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Column offsets</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container"><br>
|
||||||
|
<div class="row"><div class="col-sm-8 col-sm-offset-2"><div class="box-colored">size = 8, offset = 2</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-6 col-sm-offset-3"><div class="box-colored">size = 6, offset = 3</div></div></div>
|
||||||
|
<div class="row"><div class="col-sm-4 col-sm-offset-4"><div class="box-colored">size = 4, offset = 4</div></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 col-sm-offset-1"><div class="box-colored">size = 4, offset = 1</div></div>
|
||||||
|
<div class="col-sm-4 col-sm-offset-2"><div class="box-colored">size = 4, offset = 2</div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to move columns to the right, you can use the offset classes on your columns. Offset classes use the <code>.col-<span class="fore-primary">SCR_SZ</span>-offset-<span class="fore-secondary">COL_WD</span></code> syntax, where <code><span class="fore-primary">SCR_SZ</span></code> is one of the available screen size names (<code><span class="fore-tertiary">sm</span></code>, <code><span class="fore-tertiary">md</span></code> or <code><span class="fore-tertiary">lg</span></code>) and <code><span class="fore-secondary">COL_WD</span></code> a number from <code>0</code> to <code>11</code> specifying the width of the column's offset. Offsets can also be used in combination with screen-specific layouts and column sizes, providing you with greater flexibility when spacing out your content.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<p style="text-align: justify;">The example presented below showcases the grid system's offsetting syntax for smaller screens, but you can do the same thing for any screen size.</p>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-8 col-sm-offset-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 col-sm-offset-3">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 col-sm-offset-4">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm-offset-1">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 col-sm-offset-1">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4 col-sm-offset-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Columns with offsets and columns without offsets can be mixed for better results. In fact, we strongly suggest you try that.</li>
|
||||||
|
<li>Remember to specify a basic layout and/or screen specific layouts in addition to the offset classes.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-md-offset-1 col-md-5 col-lg-4">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm col-md-5 col-lg-4 col-lg-offset-2">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can specify offset classes when you need them and omit them otherwise. This means that, if you want to offset a column only on a medium-sized or a larger screen, you can just specify the offset for that specific screen. Specifying an offset for a smaller screen, however, will apply it to medium-sized and larger screens as well, medium-sized screen offsets will apply to larger screens etc. similar to how the layout system works.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-md-10 col-offset-1 col-lg col-lg-offset-0">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">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 use the <code>.col-<span class="fore-primary">SCR_SZ</span>-offset-0</code> class, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size, effectively resetting all offsets.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="column-reorder">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Column reordering</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row"><div class="col-sm"><br><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored red">first</div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
</div><div class="row"><div class="col-sm"><br><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored red">normal</div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
</div>
|
||||||
|
<div class="row"><div class="col-sm"><br><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored"> </div></div>
|
||||||
|
<div class="col-sm col-sm"><div class="box-colored red">last</div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Additionally, if you want to reorder your columns, you can do that to some extent using the <code>.col-<span class="fore-primary">SCR_SZ</span>-first</code>, <code>.col-<span class="fore-primary">SCR_SZ</span>-last</code> and <code>.col-<span class="fore-primary">SCR_SZ</span>-normal</code> classes to your columns, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code>, <code><span class="fore-tertiary">md</span></code> or <code><span class="fore-tertiary">lg</span></code>). These classes will change the ordering of your columns appropriately to allow you to move content around any way you want (e.g. moving a navigation sidebar from the left of the content on larger displays to the end of the content on smaller displays).</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-md-last col-lg-normal">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-first col-md-normal">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm col-md-first col-lg-normal">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Columns are ordered by default in order of appearance. You should only apply column reordering classes to the columns you want to reorder on the screen-specific layouts you need them.</li>
|
||||||
|
<li>Remember to specify a basic layout and/or screen specific layouts in addition to the column reordering classes.</li>
|
||||||
|
<li>Column reordering is applied from smaller to larger screens, similar to how column layout and offsetting work.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm col-md-last">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm col-md-last">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use multiple <code>.col-<span class="fore-primary">SCR_SZ</span>-first</code>s and <code>.col-<span class="fore-primary">SCR_SZ</span>-last</code>s, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size, in the same row for the same screen size. If you specify more than one column to be first or last, the columns with the same order will be placed at the beggining or end of the row and the order between them will be determined based on their order of appearance in the DOM tree afterwards.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-last col-md-normal">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> To remove a previously applied reorder from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no reordering is active on a column, you can use the <code>.col-<span class="fore-primary">SCR_SZ</span>-normal</code> class, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size, effectively resetting all reorders. You do not, however, need to add this class to all other columns or use it when there are no reorders applied.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="media-object">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Media object pattern</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row"><div class="col-sm"><br></div></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm col-sm-2"><img src="https://placehold.it/800x600" alt="image"></div>
|
||||||
|
<div class="col-sm col-sm row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<h3>Media object heading</h3>
|
||||||
|
<p>This is an example implementation of the popular media object pattern, using simple grid rules.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">Last, but not least, you can use the grid system's classes to create a <a href="https://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/">media object</a> in one of many ways, based on your needs. The simplest way to implement a media object is using two columns, one for the media (i.e. <code><img></code>) and one for the textual content next to the media.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-1">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul>
|
||||||
|
<li>The media object is not a different component, but rather a popular pattern that can be implemented using the standard grid system classes.</li>
|
||||||
|
<li>You can use many different elements for your media object. For example, you can make the right side of the media object contain a form or an input field.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-1 col-md-2 col-lg-3">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-11 col-md-10 col-lg-9">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can make your media object responsive, by adding screen-specific layout classes to its columns.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-1 col-sm-last">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can align the media object's content to the left of the image (instead of the other way round), using the <code>.col-<span class="fore-primary">SCR_SZ</span>-normal</code> class, replacing <code><span class="fore-primary">SCR_SZ</span></code> with the desired screen size.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Parent media object</h2>
|
||||||
|
<p>Parent media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<img src="...">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Child media object</h2>
|
||||||
|
<p>Child media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> Media objects can be easily nested. You can use <code>.row</code> elements in the content column of the media object to make everything align perfectly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="row">
|
||||||
|
<img src="..." class="col-sm-1">
|
||||||
|
<div class="col-sm">
|
||||||
|
<h2>Media object heading</h2>
|
||||||
|
<p>Media object content...</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Do not apply a column class directly to the media element (e.g.<code><img></code>) or the content of the media object, as this can cause problems with certain elements. Wrap your media objects columns in <code><div></code> elements and apply the grid classes to them, instead.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
563
docs/v2/input_control.html~HEAD
Normal file
563
docs/v2/input_control.html~HEAD
Normal file
|
@ -0,0 +1,563 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Input Control</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, input, control, form, button ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media (max-width: 1269px) and (min-width: 768px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-bottom: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
.responsive-label {align-items: center;} @media (min-width: 768px) { .responsive-label .col-md-3 {text-align: right;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="input-control-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Input Control</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements' styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">The presentation of forms, input fields, buttons and other interactive elements is always very important for any website or app. The <strong>input_control</strong> module provides you with much needed styling improvements for all of these elements, while keeping everything simple to use and understand, as well as combine with the other modules. Forms and input elements have a clean, modern design, while some elements like checkoxes and radio buttons get a much needed facelift. Buttons have also been stylized to look the same in all browsers, while keeping their design clean and allowing for a few color and size variants. Grouping inputs and labels or buttons is also part of this module and, as always, responsiveness is an important feature. Finally, all of the components are accessible, with a few minor caveats, that are discussed in their respective section in this page.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>input_control</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="forms-input">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Forms & input</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-normal col-lg-8 col-lg-offset-2">
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Inline form (default style)</legend>
|
||||||
|
<div class="input-group"><label for="username">Username</label> <input type="email" value="" id="username" placeholder="username"> </div>
|
||||||
|
<div class="input-group"><label for="pwd">Password</label> <input type="password" value="" id="pwd" placeholder="password"></div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Fluid form</legend>
|
||||||
|
<div class="input-group fluid"><label for="username2">Username</label> <input type="email" value="" id="username2" placeholder="username"></div>
|
||||||
|
<div class="input-group fluid"><label for="pwd2">Password</label> <input type="password" value="" id="pwd2" placeholder="password"></div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Vertical form</legend>
|
||||||
|
<div class="input-group vertical"><label for="username2">Username</label> <input type="email" value="" id="username2" placeholder="username"></div>
|
||||||
|
<div class="input-group vertical"><label for="pwd2">Password</label> <input type="password" value="" id="pwd2" placeholder="password"></div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Aligned form (using grid)</legend>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="number">Number</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="number" value="42" id="number" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="invalid">Invalid</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input value="invalid" id="invalid" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
<script>document.getElementById("invalid").setCustomValidity("This field is invalid");</script>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="disabled">Disabled</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input disabled value="disabled" id="disabled" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="readonly">Readonly</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input readonly value="readonly" id="readonly" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="select">Select</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<select id="select"> <option>Apples</option> <option>Oranges</option> </select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-normal">
|
||||||
|
<p style="text-align: justify;">Forms are structured the same way you would structure a normal form in HTML5. Simply create a root <code><form></code> element and add your <code><input></code> elements inside. Link them to <code><label></code> elements for ease of access and you are pretty much set. We highly recommend using the <code><fieldset></code> and <code><legend></code> elements to annotate your forms as well, but you can skip them if you wish.</p>
|
||||||
|
<p style="text-align: justify;">Forms are inline by default. Use the <code>.input-group</code> class on a <code><div></code> wrapping inside it an <code><input></code> and <code><label></code> pair to make sure they always display together in one line. You can make your <code>.input-group</code>s respond to viewport changes, by adding the <code>.fluid</code> class to them or you can align them vertically by adding the <code>.vertical</code> class. Finally, if you want to create aligned forms with a preset layout, you can utilize the <a href="grid"><strong>grid</strong></a> module's rows and columns.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Simple form</legend>
|
||||||
|
<div class="input-group fluid">
|
||||||
|
<label for="username">Username</label>
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
<div class="input-group fluid">
|
||||||
|
<label for="pwd">Password</label>
|
||||||
|
<input type="password" value="" id="pwd" placeholder="password">
|
||||||
|
</div>
|
||||||
|
<div class="input-group vertical">
|
||||||
|
<label for="nmbr">Number</label>
|
||||||
|
<input type="number" id="nmbr" value="5">
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Using the <code><fieldset></code> and <code><legend></code> elements is highly recommended for a better presentational effect. Using these elements is a matter of personal preference, however try to keep your forms consistent (i.e. either use them in all forms or no forms as to not confuse users).</li>
|
||||||
|
<li>Some <code><input></code> 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 website or app.</li>
|
||||||
|
<li>Checkboxes and radio buttons are not stylized the same way as most of the other elements, nor do they follow the exact same stucture for layout. Please refer to the next section for information on how to use those.</li>
|
||||||
|
<li>Try not to combine the <strong>grid</strong> module's classes with <code>.fluid</code> or <code>.vertical</code> <code>.input-group</code>s, as this might cause certain styles to overlap and not display exactly like you want them to.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="username">username</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="pwd">password</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<input type="password" value="" id="pwd" placeholder="password">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> (replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column) to set specific layouts for your aligned forms. You can also use the same column classes to make them responsive for different screen sizes.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-10 col-md-offset-1">
|
||||||
|
<label for="username">username</label>
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-10 col-md-offset-1">
|
||||||
|
<label for="pwd">password</label>
|
||||||
|
<input type="password" value="" id="pwd" placeholder="password">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> Apart from using <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> for responsiveness, you can also use other classes from the <strong>grid</strong> module such as the offset classes to make your form layouts more interesting.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><style>
|
||||||
|
.label-aligned {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row label-aligned">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="username">username</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> When creating aligned forms using the <strong>grid</strong> module's classes, labels might be off-center vertically compared to their inline counterparts. Use a simple styling for their parent <code>.row</code> element, if you want to adjust their vertical alignment.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row input-group">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="username">username</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using the <code>.input-group</code> class when creating aligned forms. This might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="checkbox-radio">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Checkboxes & radio buttons</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<div class="box-centered">
|
||||||
|
<br>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="checkbox" id="chk1" tabindex="0"> <label for="chk1"> Checkbox</label>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="radio" name="radios" value="r1" id="r1" tabindex="0" checked> <label for="r1"> Value 1</label> <br>
|
||||||
|
<input type="radio" name="radios" value="r2" id="r2" tabindex="0"> <label for="r2"> Value 2</label> <br>
|
||||||
|
<input type="radio" name="radios" value="r3" id="r3" tabindex="0"> <label for="r3"> Value 3</label> <br>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Checkboxes and radio buttons come pre-styled, using the <a href="https://css-tricks.com/the-checkbox-hack/">checkbox hack</a>, while remaining fully accessible. To create a checkbox or radio button, start using a <code><div></code> that implements the <code>.input-group</code> class, and then add an <code><input></code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">"checkbox"</span></code> or <code><span class="fore-primary">"radio"</span></code>), followed immediately by a <code><label></code> linking to it. Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to your <code><input></code>, so that it will register properly for screen readers.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="check1" tabindex="0">
|
||||||
|
<label for="check1">Checkbox</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="radio" id="rad1" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad1">Radio</label>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Checkboxes and radio buttons are fully accessible. However, if not provided with a label, they are not visible to users, but only to screen readers.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="radio" id="rad1" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad1">Value 1</label>
|
||||||
|
<input type="radio" id="rad2" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad2">Value 2</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can add multiple <code>radio</code> buttons inside one <code>.input-group</code>, as long as they follow the syntax shown above. In fact, we strongly recommend grouping controls that are relevant to each other in this manner.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><input type="checkbox" id="check1" tabindex="0">
|
||||||
|
<label for="check1">Checkbox</label></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Always use an <code>.input-group</code> for your checkboxes and radio buttons. Not doing so will cause the checkbox or radio button to not display properly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="check1"
|
||||||
|
<label for="check1">Checkbox</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to all your checkboxes and radio buttons to make them accessible.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<label for="check1">Checkbox</label>
|
||||||
|
<input type="checkbox" id="check1" tabindex="0">
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The structure of checkboxes and radio buttons is very strict, meaning that the <code><label></code> should always be after the <code><input></code> and never before, otherwise the checkbox or radio button will not display properly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="radio" id="rad1" tabindex="0" name="radio-group-1">
|
||||||
|
<input type="radio" id="rad2" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad2">Value 2</label>
|
||||||
|
<label for="rad1">Value 1</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> When using multiple radio buttons inside an <code>.input-group</code>, remember to use the usual structure of the radio button component for each radio button (i.e. the <code><input></code> and <code><label></code>). Not doing so will cause the radio buttons to not display properly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="check1" tabindex="0">
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Never leave a checkbox or radio button without a <code><label></code>. The <code><label></code> is essential to properly display the checkbox or radio button.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="switches">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Switches</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4 col-lg-normal">
|
||||||
|
<div class="box-centered">
|
||||||
|
<br />
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="checkbox" id="switch-box" tabindex="0">
|
||||||
|
<label for="switch-box" class="switch">Switch</label>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8 col-lg-normal">
|
||||||
|
<p style="text-align: justify;">Switches are almost identical in structure to checkboxes and radio buttons (an <code>.input-group</code> containing an <code><input></code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">"checkbox"</span></code> or <code><span class="fore-primary">"radio"</span></code>), followed immediately by a <code><label></code> linking to it), their only difference being that you need to add the <code>.switch</code> class to <code><label></code> element to turn your input into a switch. Remember to apply <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to your <code><input></code> to make it accessible.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="switch1" tabindex="0">
|
||||||
|
<label for="switch1" class="switch">Checkbox switch</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="radswitch1" class="switch">Radio switch</label>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>You can create your own color variants for the <code>.switch</code> component. For more information, check out the <a href="customization">customization page</a>.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<label for="switch1">Switch with text on its left</label>
|
||||||
|
<input type="checkbox" id="switch1" tabindex="0">
|
||||||
|
<label for="switch1" class="switch"></label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> By using two <code><label></code> elements, you can move the actual <code>.switch</code> to the right of the label's text, effectively allowing you to change the layout. Remember to not add any text to your second <code><label></code> that implements the <code>.switch</code> class. You might want, however, to add a few trailing spaces to the first <code><label></code> element to make sure the text does not get covered by the component.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="buttons">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Buttons & button groups</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<button>Default button</button>
|
||||||
|
<button class="primary">Primary button</button>
|
||||||
|
<button class="secondary">Secondary button</button>
|
||||||
|
<button class="tertiary">Tertiary button</button>
|
||||||
|
<button class="inverse">Inverse button</button>
|
||||||
|
<button class="small">Small button</button>
|
||||||
|
<button class="large">Large button</button>
|
||||||
|
<button disabled>Disabled button</button>
|
||||||
|
<h4>Button group</h4>
|
||||||
|
<div class="button-group"> <button>Button</button> <button>Button</button> <button>Button</button> </div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">All button types have been stylized by default, while maintaining accessiblity. Simply add any <code><button></code> or an <code><input></code> with a button <code><span class="secondary">type</span></code> (i.e. <code><span class="fore-primary">"button"</span></code>, <code><span class="fore-primary">"submit"</span></code> or <code><span class="fore-primary">"reset"</span></code>) and they will be styled accordingly. You can also use the <code>.button</code> class or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> attribute for links, labels and other elements of your choice to make them look like buttons.</p>
|
||||||
|
<p style="text-align: justify;">Color variants are available in the form of the <code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code> and <code>.inverse</code> classes. Size variants are available as well in the form of <code>.small</code> and <code>.large</code> classes.</p>
|
||||||
|
<p style="text-align: justify;">Finally, you can create responsive groups of buttons by wrapping them inside a <code><div></code> with the <code>.button-group</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><button>Default button</button>
|
||||||
|
<input type="button" class="primary" value="Primary button">
|
||||||
|
<input type="reset" class="secondary" value="Secondary button">
|
||||||
|
<input type="submit" class="tertiary" value="Tertiary button">
|
||||||
|
<button class="inverse">Inverse button</button>
|
||||||
|
<button class="small">Small button</button>
|
||||||
|
<button class="large">Large button</button>
|
||||||
|
<button disabled>Disabled button</button>
|
||||||
|
<a href="#" class="button">Link button</a>
|
||||||
|
<a href="#" role="button">Link button</a>
|
||||||
|
<label class="button">Label button</label>
|
||||||
|
<label role="button">Label button</label>
|
||||||
|
|
||||||
|
<div class="button-group">
|
||||||
|
<button>Button</button>
|
||||||
|
<button>Button</button>
|
||||||
|
<button>Button</button>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>If you want more color or size variants for your buttons, check out the <a href="customization">customization</a> page.</li>
|
||||||
|
<li>The <code>.button-group</code> component is compatible with modern browsers, but might not display properly in older browsers.</li>
|
||||||
|
<li><code>.button-group</code>s will display as a horizontal container with all their buttons in one row on medium-sized and larger displays, however they will collapse into a column view for smaller displays.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><button class="inverse small">Small inverse button</button></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can mix and match button color and size variants to achieve the desired effect.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><button class="secondary inverse">Problematic button</button>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<button class="small large">Problematic button</button></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid mixing two or more button color or size variants, as these combinations might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="button-group">
|
||||||
|
<button>Button</button>
|
||||||
|
<input type="reset" class="secondary" value="Secondary button">
|
||||||
|
<label class="button inverse">Label button</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use button color variants inside the same <code>.button-group</code>. You can also use any component styled like a button inside a <code>.button-group</code>.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="button-group">
|
||||||
|
<button class="large">Button</button>
|
||||||
|
<button>Button</button>
|
||||||
|
<button class="small">Button</button>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using button size variants inside a <code>.button-group</code>, as this might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="file-upload">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>File upload buttons</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<div class="input-group">
|
||||||
|
<br>
|
||||||
|
<input type="file" id="file-input-demo">
|
||||||
|
<label for="file-input-demo" class="button"><i class="fa fa-upload" aria-hidden="true"></i> Upload file</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">File upload buttons are commonly a sore spot in CSS frameworks. We try to remedy this problem by hiding the <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"file"</span>></code>, while maintaining accessibility and using a linked <code><label></code> of the <code>.button</code> class to display it in a modern way.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><input type="file" id="file-input">
|
||||||
|
<label for="file-input" class="button">Upload file...</label></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>The icon displayed in the example above is not part of the button styling.</li>
|
||||||
|
<li>File upload buttons do not change their text to the name of the file after the user has selected a file to upload. You can, however, add this functionality using a few lines of Javascript.</li>
|
||||||
|
<li>File upload buttons cannot be focused (i.e. have a <code>:focus</code> state) using the keyboard and this applies to linked labels, too. You can use Javascript to add this functionality, if you wish.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="file" id="file-input">
|
||||||
|
<label for="file-input" class="button">Upload file...</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use an <code>.input-group</code> to wrap the file upload <code><input></code> and its linked <code><label></code>, if you wish.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
563
docs/v2/input_control.html~gluon.v3
Normal file
563
docs/v2/input_control.html~gluon.v3
Normal file
|
@ -0,0 +1,563 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Input Control</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, input, control, form, button ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media (max-width: 1269px) and (min-width: 768px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-bottom: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
.responsive-label {align-items: center;} @media (min-width: 768px) { .responsive-label .col-md-3 {text-align: right;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="input-control-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Input Control</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements' styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">The presentation of forms, input fields, buttons and other interactive elements is always very important for any website or app. The <strong>input_control</strong> module provides you with much needed styling improvements for all of these elements, while keeping everything simple to use and understand, as well as combine with the other modules. Forms and input elements have a clean, modern design, while some elements like checkoxes and radio buttons get a much needed facelift. Buttons have also been stylized to look the same in all browsers, while keeping their design clean and allowing for a few color and size variants. Grouping inputs and labels or buttons is also part of this module and, as always, responsiveness is an important feature. Finally, all of the components are accessible, with a few minor caveats, that are discussed in their respective section in this page.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>input_control</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="forms-input">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Forms & input</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-normal col-lg-8 col-lg-offset-2">
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Inline form (default style)</legend>
|
||||||
|
<div class="input-group"><label for="username">Username</label> <input type="email" value="" id="username" placeholder="username"> </div>
|
||||||
|
<div class="input-group"><label for="pwd">Password</label> <input type="password" value="" id="pwd" placeholder="password"></div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Fluid form</legend>
|
||||||
|
<div class="input-group fluid"><label for="username2">Username</label> <input type="email" value="" id="username2" placeholder="username"></div>
|
||||||
|
<div class="input-group fluid"><label for="pwd2">Password</label> <input type="password" value="" id="pwd2" placeholder="password"></div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Vertical form</legend>
|
||||||
|
<div class="input-group vertical"><label for="username2">Username</label> <input type="email" value="" id="username2" placeholder="username"></div>
|
||||||
|
<div class="input-group vertical"><label for="pwd2">Password</label> <input type="password" value="" id="pwd2" placeholder="password"></div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Aligned form (using grid)</legend>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="number">Number</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="number" value="42" id="number" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="invalid">Invalid</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input value="invalid" id="invalid" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
<script>document.getElementById("invalid").setCustomValidity("This field is invalid");</script>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="disabled">Disabled</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input disabled value="disabled" id="disabled" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="readonly">Readonly</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input readonly value="readonly" id="readonly" style="width:85%;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row responsive-label">
|
||||||
|
<div class="col-sm-12 col-md-3">
|
||||||
|
<label for="select">Select</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<select id="select"> <option>Apples</option> <option>Oranges</option> </select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-normal">
|
||||||
|
<p style="text-align: justify;">Forms are structured the same way you would structure a normal form in HTML5. Simply create a root <code><form></code> element and add your <code><input></code> elements inside. Link them to <code><label></code> elements for ease of access and you are pretty much set. We highly recommend using the <code><fieldset></code> and <code><legend></code> elements to annotate your forms as well, but you can skip them if you wish.</p>
|
||||||
|
<p style="text-align: justify;">Forms are inline by default. Use the <code>.input-group</code> class on a <code><div></code> wrapping inside it an <code><input></code> and <code><label></code> pair to make sure they always display together in one line. You can make your <code>.input-group</code>s respond to viewport changes, by adding the <code>.fluid</code> class to them or you can align them vertically by adding the <code>.vertical</code> class. Finally, if you want to create aligned forms with a preset layout, you can utilize the <a href="grid"><strong>grid</strong></a> module's rows and columns.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Simple form</legend>
|
||||||
|
<div class="input-group fluid">
|
||||||
|
<label for="username">Username</label>
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
<div class="input-group fluid">
|
||||||
|
<label for="pwd">Password</label>
|
||||||
|
<input type="password" value="" id="pwd" placeholder="password">
|
||||||
|
</div>
|
||||||
|
<div class="input-group vertical">
|
||||||
|
<label for="nmbr">Number</label>
|
||||||
|
<input type="number" id="nmbr" value="5">
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Using the <code><fieldset></code> and <code><legend></code> elements is highly recommended for a better presentational effect. Using these elements is a matter of personal preference, however try to keep your forms consistent (i.e. either use them in all forms or no forms as to not confuse users).</li>
|
||||||
|
<li>Some <code><input></code> 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 website or app.</li>
|
||||||
|
<li>Checkboxes and radio buttons are not stylized the same way as most of the other elements, nor do they follow the exact same stucture for layout. Please refer to the next section for information on how to use those.</li>
|
||||||
|
<li>Try not to combine the <strong>grid</strong> module's classes with <code>.fluid</code> or <code>.vertical</code> <code>.input-group</code>s, as this might cause certain styles to overlap and not display exactly like you want them to.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="username">username</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="pwd">password</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<input type="password" value="" id="pwd" placeholder="password">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> (replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column) to set specific layouts for your aligned forms. You can also use the same column classes to make them responsive for different screen sizes.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-10 col-md-offset-1">
|
||||||
|
<label for="username">username</label>
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-10 col-md-offset-1">
|
||||||
|
<label for="pwd">password</label>
|
||||||
|
<input type="password" value="" id="pwd" placeholder="password">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> Apart from using <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> for responsiveness, you can also use other classes from the <strong>grid</strong> module such as the offset classes to make your form layouts more interesting.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><style>
|
||||||
|
.label-aligned {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row label-aligned">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="username">username</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> When creating aligned forms using the <strong>grid</strong> module's classes, labels might be off-center vertically compared to their inline counterparts. Use a simple styling for their parent <code>.row</code> element, if you want to adjust their vertical alignment.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><form>
|
||||||
|
<fieldset>
|
||||||
|
<legend>Responsive form</legend>
|
||||||
|
<div class="row input-group">
|
||||||
|
<div class="col-sm-12 col-md-4">
|
||||||
|
<label for="username">username</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md">
|
||||||
|
<input type="email" value="" id="username" placeholder="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using the <code>.input-group</code> class when creating aligned forms. This might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="checkbox-radio">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Checkboxes & radio buttons</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<div class="box-centered">
|
||||||
|
<br>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="checkbox" id="chk1" tabindex="0"> <label for="chk1"> Checkbox</label>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="radio" name="radios" value="r1" id="r1" tabindex="0" checked> <label for="r1"> Value 1</label> <br>
|
||||||
|
<input type="radio" name="radios" value="r2" id="r2" tabindex="0"> <label for="r2"> Value 2</label> <br>
|
||||||
|
<input type="radio" name="radios" value="r3" id="r3" tabindex="0"> <label for="r3"> Value 3</label> <br>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Checkboxes and radio buttons come pre-styled, using the <a href="https://css-tricks.com/the-checkbox-hack/">checkbox hack</a>, while remaining fully accessible. To create a checkbox or radio button, start using a <code><div></code> that implements the <code>.input-group</code> class, and then add an <code><input></code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">"checkbox"</span></code> or <code><span class="fore-primary">"radio"</span></code>), followed immediately by a <code><label></code> linking to it. Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to your <code><input></code>, so that it will register properly for screen readers.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="check1" tabindex="0">
|
||||||
|
<label for="check1">Checkbox</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="radio" id="rad1" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad1">Radio</label>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Checkboxes and radio buttons are fully accessible. However, if not provided with a label, they are not visible to users, but only to screen readers.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="radio" id="rad1" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad1">Value 1</label>
|
||||||
|
<input type="radio" id="rad2" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad2">Value 2</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can add multiple <code>radio</code> buttons inside one <code>.input-group</code>, as long as they follow the syntax shown above. In fact, we strongly recommend grouping controls that are relevant to each other in this manner.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><input type="checkbox" id="check1" tabindex="0">
|
||||||
|
<label for="check1">Checkbox</label></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Always use an <code>.input-group</code> for your checkboxes and radio buttons. Not doing so will cause the checkbox or radio button to not display properly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="check1"
|
||||||
|
<label for="check1">Checkbox</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to all your checkboxes and radio buttons to make them accessible.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<label for="check1">Checkbox</label>
|
||||||
|
<input type="checkbox" id="check1" tabindex="0">
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The structure of checkboxes and radio buttons is very strict, meaning that the <code><label></code> should always be after the <code><input></code> and never before, otherwise the checkbox or radio button will not display properly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="radio" id="rad1" tabindex="0" name="radio-group-1">
|
||||||
|
<input type="radio" id="rad2" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="rad2">Value 2</label>
|
||||||
|
<label for="rad1">Value 1</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> When using multiple radio buttons inside an <code>.input-group</code>, remember to use the usual structure of the radio button component for each radio button (i.e. the <code><input></code> and <code><label></code>). Not doing so will cause the radio buttons to not display properly.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="check1" tabindex="0">
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Never leave a checkbox or radio button without a <code><label></code>. The <code><label></code> is essential to properly display the checkbox or radio button.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="switches">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Switches</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4 col-lg-normal">
|
||||||
|
<div class="box-centered">
|
||||||
|
<br />
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="checkbox" id="switch-box" tabindex="0">
|
||||||
|
<label for="switch-box" class="switch">Switch</label>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8 col-lg-normal">
|
||||||
|
<p style="text-align: justify;">Switches are almost identical in structure to checkboxes and radio buttons (an <code>.input-group</code> containing an <code><input></code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">"checkbox"</span></code> or <code><span class="fore-primary">"radio"</span></code>), followed immediately by a <code><label></code> linking to it), their only difference being that you need to add the <code>.switch</code> class to <code><label></code> element to turn your input into a switch. Remember to apply <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to your <code><input></code> to make it accessible.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="checkbox" id="switch1" tabindex="0">
|
||||||
|
<label for="switch1" class="switch">Checkbox switch</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
|
||||||
|
<label for="radswitch1" class="switch">Radio switch</label>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>You can create your own color variants for the <code>.switch</code> component. For more information, check out the <a href="customization">customization page</a>.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<label for="switch1">Switch with text on its left</label>
|
||||||
|
<input type="checkbox" id="switch1" tabindex="0">
|
||||||
|
<label for="switch1" class="switch"></label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> By using two <code><label></code> elements, you can move the actual <code>.switch</code> to the right of the label's text, effectively allowing you to change the layout. Remember to not add any text to your second <code><label></code> that implements the <code>.switch</code> class. You might want, however, to add a few trailing spaces to the first <code><label></code> element to make sure the text does not get covered by the component.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="buttons">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Buttons & button groups</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<button>Default button</button>
|
||||||
|
<button class="primary">Primary button</button>
|
||||||
|
<button class="secondary">Secondary button</button>
|
||||||
|
<button class="tertiary">Tertiary button</button>
|
||||||
|
<button class="inverse">Inverse button</button>
|
||||||
|
<button class="small">Small button</button>
|
||||||
|
<button class="large">Large button</button>
|
||||||
|
<button disabled>Disabled button</button>
|
||||||
|
<h4>Button group</h4>
|
||||||
|
<div class="button-group"> <button>Button</button> <button>Button</button> <button>Button</button> </div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">All button types have been stylized by default, while maintaining accessiblity. Simply add any <code><button></code> or an <code><input></code> with a button <code><span class="secondary">type</span></code> (i.e. <code><span class="fore-primary">"button"</span></code>, <code><span class="fore-primary">"submit"</span></code> or <code><span class="fore-primary">"reset"</span></code>) and they will be styled accordingly. You can also use the <code>.button</code> class or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> attribute for links, labels and other elements of your choice to make them look like buttons.</p>
|
||||||
|
<p style="text-align: justify;">Color variants are available in the form of the <code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code> and <code>.inverse</code> classes. Size variants are available as well in the form of <code>.small</code> and <code>.large</code> classes.</p>
|
||||||
|
<p style="text-align: justify;">Finally, you can create responsive groups of buttons by wrapping them inside a <code><div></code> with the <code>.button-group</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><button>Default button</button>
|
||||||
|
<input type="button" class="primary" value="Primary button">
|
||||||
|
<input type="reset" class="secondary" value="Secondary button">
|
||||||
|
<input type="submit" class="tertiary" value="Tertiary button">
|
||||||
|
<button class="inverse">Inverse button</button>
|
||||||
|
<button class="small">Small button</button>
|
||||||
|
<button class="large">Large button</button>
|
||||||
|
<button disabled>Disabled button</button>
|
||||||
|
<a href="#" class="button">Link button</a>
|
||||||
|
<a href="#" role="button">Link button</a>
|
||||||
|
<label class="button">Label button</label>
|
||||||
|
<label role="button">Label button</label>
|
||||||
|
|
||||||
|
<div class="button-group">
|
||||||
|
<button>Button</button>
|
||||||
|
<button>Button</button>
|
||||||
|
<button>Button</button>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>If you want more color or size variants for your buttons, check out the <a href="customization">customization</a> page.</li>
|
||||||
|
<li>The <code>.button-group</code> component is compatible with modern browsers, but might not display properly in older browsers.</li>
|
||||||
|
<li><code>.button-group</code>s will display as a horizontal container with all their buttons in one row on medium-sized and larger displays, however they will collapse into a column view for smaller displays.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><button class="inverse small">Small inverse button</button></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can mix and match button color and size variants to achieve the desired effect.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><button class="secondary inverse">Problematic button</button>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<button class="small large">Problematic button</button></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid mixing two or more button color or size variants, as these combinations might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="button-group">
|
||||||
|
<button>Button</button>
|
||||||
|
<input type="reset" class="secondary" value="Secondary button">
|
||||||
|
<label class="button inverse">Label button</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use button color variants inside the same <code>.button-group</code>. You can also use any component styled like a button inside a <code>.button-group</code>.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="button-group">
|
||||||
|
<button class="large">Button</button>
|
||||||
|
<button>Button</button>
|
||||||
|
<button class="small">Button</button>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using button size variants inside a <code>.button-group</code>, as this might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="file-upload">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>File upload buttons</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<div class="input-group">
|
||||||
|
<br>
|
||||||
|
<input type="file" id="file-input-demo">
|
||||||
|
<label for="file-input-demo" class="button"><i class="fa fa-upload" aria-hidden="true"></i> Upload file</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">File upload buttons are commonly a sore spot in CSS frameworks. We try to remedy this problem by hiding the <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"file"</span>></code>, while maintaining accessibility and using a linked <code><label></code> of the <code>.button</code> class to display it in a modern way.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><input type="file" id="file-input">
|
||||||
|
<label for="file-input" class="button">Upload file...</label></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>The icon displayed in the example above is not part of the button styling.</li>
|
||||||
|
<li>File upload buttons do not change their text to the name of the file after the user has selected a file to upload. You can, however, add this functionality using a few lines of Javascript.</li>
|
||||||
|
<li>File upload buttons cannot be focused (i.e. have a <code>:focus</code> state) using the keyboard and this applies to linked labels, too. You can use Javascript to add this functionality, if you wish.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="input-group">
|
||||||
|
<input type="file" id="file-input">
|
||||||
|
<label for="file-input" class="button">Upload file...</label>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can use an <code>.input-group</code> to wrap the file upload <code><input></code> and its linked <code><label></code>, if you wish.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
210
docs/v2/modules.html~HEAD
Normal file
210
docs/v2/modules.html~HEAD
Normal file
|
@ -0,0 +1,210 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Modules</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, modules">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .box-left { text-align: left; } li a { text-decoration: none; } h2.section + div.section.box-left { height: 100%; }
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Modules</h1>
|
||||||
|
<p style="text-align: justify;"><strong>mini.css</strong> uses modules as its base building blocks. Each module contains one or more components that affect the same part of the user experience. Below you can see a quick overview of all the modules that compose <strong>mini.css</strong>.</p><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="primary"><i class="fa fa-font fa-fw" aria-hidden="true"></i></mark> Core</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like. More specifically, the <strong>core</strong> module contains:</p><ul>
|
||||||
|
<li><a href="core#typography" class="sublink-1">General typography rules</a></li>
|
||||||
|
<li><a href="core#headings" class="sublink-1">Styling for headings</a></li>
|
||||||
|
<li><a href="core#common-textual-elements" class="sublink-1">Styling for common textual elements</a></li>
|
||||||
|
<li><a href="core#lists" class="sublink-1">Styling for lists</a></li>
|
||||||
|
<li><a href="core#images-captions" class="sublink-1">Rules for image responsiveness and captions</a></li>
|
||||||
|
</ul></div><a href="core" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-th-large fa-fw" aria-hidden="true"></i></mark> Grid</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>grid</strong> module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as <em>flexbox</em>). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens. More specifically, the <strong>grid</strong> module contains:</p><ul>
|
||||||
|
<li><a href="grid#basic-layout" class="sublink-1">Containers, rows and columns for layout</a></li>
|
||||||
|
<li><a href="grid#screen-specific-layout" class="sublink-1">Classes for defining screen-specific layouts</a></li>
|
||||||
|
<li><a href="grid#predefined-layout" class="sublink-1">Classes for predefined layouts</a></li>
|
||||||
|
<li><a href="grid#column-offset" class="sublink-1">Classes for content offsetting</a></li>
|
||||||
|
<li><a href="grid#column-reorder" class="sublink-1">Classes for content reordering</a></li>
|
||||||
|
<li><a href="grid#media-object" class="sublink-1">Layout examples for implementing the media object pattern</a></li>
|
||||||
|
</ul></div><a href="grid" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="tertiary"><i class="fa fa-keyboard-o fa-fw" aria-hidden="true"></i></mark> Input Control</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements's styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way. More specifically, the <strong>input_control</strong> module contains:</p><ul>
|
||||||
|
<li><a href="input_control#forms-input" class="sublink-1">Styling for forms and input elements</a></li>
|
||||||
|
<li><a href="input_control#checkbox-radio" class="sublink-1">Styling for checkboxes and radio buttons</a></li>
|
||||||
|
<li><a href="input_control#buttons" class="sublink-1">Styling and grouping classes for buttons</a></li>
|
||||||
|
<li><a href="input_control#switches" class="sublink-1">Classes for creating switches</a></li>
|
||||||
|
<li><a href="input_control#file-upload" class="sublink-1">Workarounds for styling file upload buttons</a></li>
|
||||||
|
</ul></div><a href="input_control" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="primary"><i class="fa fa-compass fa-fw" aria-hidden="true"></i></mark> Navigation</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation menus. More specifically, the <strong>navigation</strong> module contains:</p><ul>
|
||||||
|
<li><a href="navigation#header" class="sublink-1">Styling for headers, logos and header links</a></li>
|
||||||
|
<li><a href="navigation#navigation-bar" class="sublink-1">Styling for navigation bars</a></li>
|
||||||
|
<li><a href="navigation#drawer" class="sublink-1">Classes for creating responsive drawers</a></li>
|
||||||
|
<li><a href="navigation#footer" class="sublink-1">Styling for footers</a></li>
|
||||||
|
<li><a href="navigation#sticky" class="sublink-1">Classes for making headers and footers sticky</a></li>
|
||||||
|
</ul></div><a href="navigation" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="primary"><i class="fa fa-table fa-fw" aria-hidden="true"></i></mark> Table</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view. More specifically, the <strong>table</strong> module contains:</p><ul>
|
||||||
|
<li><a href="table#syntax-responsiveness" class="sublink-1">Styling for tables and built-in responsiveness</a></li>
|
||||||
|
<li><a href="table#scrollable-tables" class="sublink-1">Classes for creating scrollable tables</a></li>
|
||||||
|
<li><a href="table#horizontal-tables" class="sublink-1">Classes for creating horizontal tables</a></li>
|
||||||
|
<li><a href="table#variants-matrices" class="sublink-1">Classes for creating table variants and matrices</a></li>
|
||||||
|
</ul></div><a href="table" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-id-card-o fa-fw" aria-hidden="true"></i></mark> Card</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>card</strong> module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly. More specifically, the <strong>card</strong> module contains:</p><ul>
|
||||||
|
<li><a href="card#basic-syntax" class="sublink-1">Classes for creating card-based layouts</a></li>
|
||||||
|
<li><a href="card#sections-media" class="sublink-1">Classes for creating card sections and adding media</a></li>
|
||||||
|
<li><a href="card#sizing-fluidity" class="sublink-1">Classes for creating card variants and making cards fluid</a></li>
|
||||||
|
<li><a href="card#color-variants" class="sublink-1">Classes for creating card color variants</a></li>
|
||||||
|
</ul></div><a href="card" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i></mark> Tab</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want. More specifically, the <strong>tab</strong> module contains:</p><ul>
|
||||||
|
<li><a href="tab#basic-syntax" class="sublink-1">Classes for creating tab-based layouts</a></li>
|
||||||
|
<li><a href="tab#stacked-tabs" class="sublink-1">Classes for creating stacked tabs, accordions and collapses</a></li>
|
||||||
|
</ul></div><a href="tab" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-tags fa-fw" aria-hidden="true"></i></mark> Contextual</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily. More specifically, the <strong>contextual</strong> module contains:</p><ul>
|
||||||
|
<li><a href="contextual#text-highlighting" class="sublink-1">Styling for highlighted text</a></li>
|
||||||
|
<li><a href="contextual#toasts" class="sublink-1">Classes for creating toast messages</a></li>
|
||||||
|
<li><a href="contextual#tooltips" class="sublink-1">Classes for creating hover-over tooltips</a></li>
|
||||||
|
<li><a href="contextual#modals" class="sublink-1">Classes for creating modal dialogs</a></li>
|
||||||
|
</ul></div><a href="contextual" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered" style="padding-bottom: 40px;">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="tertiary"><i class="fa fa-spinner fa-fw" aria-hidden="true"></i></mark> Progress</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading. More specifically, the <strong>progress</strong> module contains:</p><ul>
|
||||||
|
<li><a href="progress#basic-progress-bar" class="sublink-1">Styling for progress bars</a></li>
|
||||||
|
<li><a href="progress#progress-variants" class="sublink-1">Classes for creating progress bar variants</a></li>
|
||||||
|
<li><a href="progress#donut-spinner" class="sublink-1">Classes for creating donut spinners</a></li>
|
||||||
|
<li><a href="progress#spinner-variants" class="sublink-1">Classes for creating donut spinner variants</a></li>
|
||||||
|
</ul></div><a href="progress" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="tertiary"><i class="fa fa-wrench fa-fw" aria-hidden="true"></i></mark> Utility</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere. More specifically, the <strong>utility</strong> module contains:</p><ul>
|
||||||
|
<li><a href="utility#visibility-helpers" class="sublink-1">Visibility helpers for hiding elements</a></li>
|
||||||
|
<li><a href="utility#borders-shadows" class="sublink-1">Classes for creating generic borders and shadows</a></li>
|
||||||
|
<li><a href="utility#responsive-sizing" class="sublink-1">Classes for responsive sizing and spacing</a></li>
|
||||||
|
<li><a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers for hiding elements</a></li>
|
||||||
|
<li><a href="utility#breadcrumbs" class="sublink-1">Classes for creating breadcrumbs</a></li>
|
||||||
|
<li><a href="utility#close-icon" class="sublink-1">Classes for creating close icons</a></li>
|
||||||
|
</ul></div><a href="utility" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
210
docs/v2/modules.html~gluon.v3
Normal file
210
docs/v2/modules.html~gluon.v3
Normal file
|
@ -0,0 +1,210 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Modules</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, modules">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .box-left { text-align: left; } li a { text-decoration: none; } h2.section + div.section.box-left { height: 100%; }
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Modules</h1>
|
||||||
|
<p style="text-align: justify;"><strong>mini.css</strong> uses modules as its base building blocks. Each module contains one or more components that affect the same part of the user experience. Below you can see a quick overview of all the modules that compose <strong>mini.css</strong>.</p><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="primary"><i class="fa fa-font fa-fw" aria-hidden="true"></i></mark> Core</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like. More specifically, the <strong>core</strong> module contains:</p><ul>
|
||||||
|
<li><a href="core#typography" class="sublink-1">General typography rules</a></li>
|
||||||
|
<li><a href="core#headings" class="sublink-1">Styling for headings</a></li>
|
||||||
|
<li><a href="core#common-textual-elements" class="sublink-1">Styling for common textual elements</a></li>
|
||||||
|
<li><a href="core#lists" class="sublink-1">Styling for lists</a></li>
|
||||||
|
<li><a href="core#images-captions" class="sublink-1">Rules for image responsiveness and captions</a></li>
|
||||||
|
</ul></div><a href="core" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-th-large fa-fw" aria-hidden="true"></i></mark> Grid</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>grid</strong> module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as <em>flexbox</em>). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens. More specifically, the <strong>grid</strong> module contains:</p><ul>
|
||||||
|
<li><a href="grid#basic-layout" class="sublink-1">Containers, rows and columns for layout</a></li>
|
||||||
|
<li><a href="grid#screen-specific-layout" class="sublink-1">Classes for defining screen-specific layouts</a></li>
|
||||||
|
<li><a href="grid#predefined-layout" class="sublink-1">Classes for predefined layouts</a></li>
|
||||||
|
<li><a href="grid#column-offset" class="sublink-1">Classes for content offsetting</a></li>
|
||||||
|
<li><a href="grid#column-reorder" class="sublink-1">Classes for content reordering</a></li>
|
||||||
|
<li><a href="grid#media-object" class="sublink-1">Layout examples for implementing the media object pattern</a></li>
|
||||||
|
</ul></div><a href="grid" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="tertiary"><i class="fa fa-keyboard-o fa-fw" aria-hidden="true"></i></mark> Input Control</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements's styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way. More specifically, the <strong>input_control</strong> module contains:</p><ul>
|
||||||
|
<li><a href="input_control#forms-input" class="sublink-1">Styling for forms and input elements</a></li>
|
||||||
|
<li><a href="input_control#checkbox-radio" class="sublink-1">Styling for checkboxes and radio buttons</a></li>
|
||||||
|
<li><a href="input_control#buttons" class="sublink-1">Styling and grouping classes for buttons</a></li>
|
||||||
|
<li><a href="input_control#switches" class="sublink-1">Classes for creating switches</a></li>
|
||||||
|
<li><a href="input_control#file-upload" class="sublink-1">Workarounds for styling file upload buttons</a></li>
|
||||||
|
</ul></div><a href="input_control" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="primary"><i class="fa fa-compass fa-fw" aria-hidden="true"></i></mark> Navigation</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation menus. More specifically, the <strong>navigation</strong> module contains:</p><ul>
|
||||||
|
<li><a href="navigation#header" class="sublink-1">Styling for headers, logos and header links</a></li>
|
||||||
|
<li><a href="navigation#navigation-bar" class="sublink-1">Styling for navigation bars</a></li>
|
||||||
|
<li><a href="navigation#drawer" class="sublink-1">Classes for creating responsive drawers</a></li>
|
||||||
|
<li><a href="navigation#footer" class="sublink-1">Styling for footers</a></li>
|
||||||
|
<li><a href="navigation#sticky" class="sublink-1">Classes for making headers and footers sticky</a></li>
|
||||||
|
</ul></div><a href="navigation" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="primary"><i class="fa fa-table fa-fw" aria-hidden="true"></i></mark> Table</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view. More specifically, the <strong>table</strong> module contains:</p><ul>
|
||||||
|
<li><a href="table#syntax-responsiveness" class="sublink-1">Styling for tables and built-in responsiveness</a></li>
|
||||||
|
<li><a href="table#scrollable-tables" class="sublink-1">Classes for creating scrollable tables</a></li>
|
||||||
|
<li><a href="table#horizontal-tables" class="sublink-1">Classes for creating horizontal tables</a></li>
|
||||||
|
<li><a href="table#variants-matrices" class="sublink-1">Classes for creating table variants and matrices</a></li>
|
||||||
|
</ul></div><a href="table" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-id-card-o fa-fw" aria-hidden="true"></i></mark> Card</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>card</strong> module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly. More specifically, the <strong>card</strong> module contains:</p><ul>
|
||||||
|
<li><a href="card#basic-syntax" class="sublink-1">Classes for creating card-based layouts</a></li>
|
||||||
|
<li><a href="card#sections-media" class="sublink-1">Classes for creating card sections and adding media</a></li>
|
||||||
|
<li><a href="card#sizing-fluidity" class="sublink-1">Classes for creating card variants and making cards fluid</a></li>
|
||||||
|
<li><a href="card#color-variants" class="sublink-1">Classes for creating card color variants</a></li>
|
||||||
|
</ul></div><a href="card" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i></mark> Tab</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want. More specifically, the <strong>tab</strong> module contains:</p><ul>
|
||||||
|
<li><a href="tab#basic-syntax" class="sublink-1">Classes for creating tab-based layouts</a></li>
|
||||||
|
<li><a href="tab#stacked-tabs" class="sublink-1">Classes for creating stacked tabs, accordions and collapses</a></li>
|
||||||
|
</ul></div><a href="tab" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="secondary"><i class="fa fa-tags fa-fw" aria-hidden="true"></i></mark> Contextual</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. Contextual toasts, tooltips and modals are also provided, aiming to help deliver important information to users. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily. More specifically, the <strong>contextual</strong> module contains:</p><ul>
|
||||||
|
<li><a href="contextual#text-highlighting" class="sublink-1">Styling for highlighted text</a></li>
|
||||||
|
<li><a href="contextual#toasts" class="sublink-1">Classes for creating toast messages</a></li>
|
||||||
|
<li><a href="contextual#tooltips" class="sublink-1">Classes for creating hover-over tooltips</a></li>
|
||||||
|
<li><a href="contextual#modals" class="sublink-1">Classes for creating modal dialogs</a></li>
|
||||||
|
</ul></div><a href="contextual" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row box-centered" style="padding-bottom: 40px;">
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="tertiary"><i class="fa fa-spinner fa-fw" aria-hidden="true"></i></mark> Progress</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading. More specifically, the <strong>progress</strong> module contains:</p><ul>
|
||||||
|
<li><a href="progress#basic-progress-bar" class="sublink-1">Styling for progress bars</a></li>
|
||||||
|
<li><a href="progress#progress-variants" class="sublink-1">Classes for creating progress bar variants</a></li>
|
||||||
|
<li><a href="progress#donut-spinner" class="sublink-1">Classes for creating donut spinners</a></li>
|
||||||
|
<li><a href="progress#spinner-variants" class="sublink-1">Classes for creating donut spinner variants</a></li>
|
||||||
|
</ul></div><a href="progress" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-6 row">
|
||||||
|
<div class="card fluid">
|
||||||
|
<h2 class="section"><mark class="tertiary"><i class="fa fa-wrench fa-fw" aria-hidden="true"></i></mark> Utility</h2>
|
||||||
|
<div class="section box-left"><p style="text-align: justify;">The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere. More specifically, the <strong>utility</strong> module contains:</p><ul>
|
||||||
|
<li><a href="utility#visibility-helpers" class="sublink-1">Visibility helpers for hiding elements</a></li>
|
||||||
|
<li><a href="utility#borders-shadows" class="sublink-1">Classes for creating generic borders and shadows</a></li>
|
||||||
|
<li><a href="utility#responsive-sizing" class="sublink-1">Classes for responsive sizing and spacing</a></li>
|
||||||
|
<li><a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers for hiding elements</a></li>
|
||||||
|
<li><a href="utility#breadcrumbs" class="sublink-1">Classes for creating breadcrumbs</a></li>
|
||||||
|
<li><a href="utility#close-icon" class="sublink-1">Classes for creating close icons</a></li>
|
||||||
|
</ul></div><a href="utility" class="button section">See more</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
368
docs/v2/navigation.html~HEAD
Normal file
368
docs/v2/navigation.html~HEAD
Normal file
|
@ -0,0 +1,368 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Navigation</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, navigation ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-md-normal {box-sizing: border-box; border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media (min-width:768px) and (max-width: 1279px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-bottom: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored { color: #f5f5f5;} .col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media (min-width: 1280px) {.col-sm-12.col-sm-last.col-md-12.col-md-normal.col-lg-4.col-lg-normal {border:0; border-right: 1px solid #c9c9c9; }}
|
||||||
|
@media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer#real-drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2" id="real-drawer">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="navigation-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Navigation</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation menus.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Menus and navigation are some of the most important elements for any website or web app and their design and ease-of-use are key factors that can determine a page's bounce rates. The <strong>navigation</strong> module takes a step back from the complicated menu and navigation design paradigms of the modern web, using HTML5 elements (i.e. <code>header</code>, <code>nav</code> and <code>footer</code>) for basic navigation, while providing fully accessibility for screen readers. Apart from the simple horizontal navigation (headers) and vertical menus (sidebars), we opted to add a responsive slide-in drawer menu that works well with any page layout. Finally, footers are also part of the <strong>navigation</strong> module, as they can often provide the user with useful information and/or links that are very important to enhancing their experience.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>navigation</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="header">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Header</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<header>
|
||||||
|
<a href="#" class="logo">Logo</a> <button>Home</button>
|
||||||
|
<a href="#" class="button">News</a> <span>|</span>
|
||||||
|
<button>About</button> <button>Contact</button>
|
||||||
|
</header> <br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The <code><header></code> HTML element is used for a page's top horizontal navigation menu. It can contain a unique <code>.logo</code> element as its first child (this structure is not mandatory, but still recommended as a best practice), which can be either text (with or without a link) or an image. The rest of the elements inside the <code><header></code> must be button elements (i.e. <code><button></code>, <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"button"</span>></code>, <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> or <code>.button</code>) in order to be styled properly. Textual separators between those can be added using <code><span></code> elements.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><header>
|
||||||
|
<a href="#" class="logo">Logo</a>
|
||||||
|
<button>Home</button>
|
||||||
|
<a href="#" class="button">News</a>
|
||||||
|
<span>|</span>
|
||||||
|
<button>About</button>
|
||||||
|
<a href="#" role="button">Contact</a>
|
||||||
|
</header></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>The <code><header></code> element is partially responsive on smaller screen devices. More specifically, when the content inside it exceeds the width of the viewport (ie. overflows to the right), users will be able to scroll horizontally in order to see the rest of the menu.</li>
|
||||||
|
<li>The <code><header></code> element does not display as <code class="fore-tertiary">fixed</code> by default. You can, however, alter this CSS property manually, if you so desire.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><header>
|
||||||
|
<a href="#" class="logo">Logo</a>
|
||||||
|
<button>Action 1</button>
|
||||||
|
<a href="#" class="button">Action 2</a>
|
||||||
|
<label class="button">Action 3</label>
|
||||||
|
</header></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can mix different elements styled like buttons inside a <code><header></code> element. In fact, we strongly recommend doing so, if you need to.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><header>
|
||||||
|
<a href="#" class="button logo">Logo</a>
|
||||||
|
</header>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<header>
|
||||||
|
<a href="#" class="logo">Logo</a>
|
||||||
|
<a href="#">Link</a>
|
||||||
|
</header></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The <code>.logo</code> element should not be a <code><button></code> element, have the <code>.button</code> class or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> attribute. On the other hand, links and labels in the <code><header></code> should not be without a <code>.button</code> class or a <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> attribute. Ignoring this rule might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="navigation-bar">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Navigation bar</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4 col-lg-normal">
|
||||||
|
<div><br>
|
||||||
|
<nav>
|
||||||
|
<a href="#">Home</a> <span>News</span>
|
||||||
|
<a href="#" class="sublink-1">New Courses</a> <a href="#" class="sublink-1">Certifications</a>
|
||||||
|
<span class="sublink-1">Events</span> <a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
|
||||||
|
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a> <a href="#" class="sublink-1">Policy Update</a>
|
||||||
|
<a href="#">About</a> <a href="#">Contact</a>
|
||||||
|
</nav><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8 col-lg-normal">
|
||||||
|
<p style="text-align: justify;">To add vertical navigation to your websites, use the <code><nav></code> HTML element. Adding links is pretty simple, just use <code><a></code> elements, no lists or anything else required. In order to add subcategories to your vertical navigation, use any normal textual element as the title of the subcategory and follow it with its links as normal, adding the <code>.sublink-1</code> class to them. Similarly, you can create a subcategory with a depth of 2, using a similar structure and the <code>.sublink-2</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><nav>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
<span>News</span>
|
||||||
|
<a href="#" class="sublink-1">New Courses</a>
|
||||||
|
<a href="#" class="sublink-1">Certifications</a>
|
||||||
|
<span class="sublink-1">Events</span>
|
||||||
|
<a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
|
||||||
|
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a>
|
||||||
|
<a href="#" class="sublink-1">Policy Update</a>
|
||||||
|
<a href="#">About</a>
|
||||||
|
<a href="#">Contact</a>
|
||||||
|
</nav></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Subcategories and their links support a depth of 2 by default. If, however, you need more than that, we recommend you check the <a href="customization">customization page</a> for instructions on how to add more depth to the vertical navigation.</li>
|
||||||
|
<li>We strongly suggest you do not add irrelevant things inside your <code><nav></code> element, like images or text that are not part of the navigation menu.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="col-sm-12 col-sm-last col-md-3 col-md-first">
|
||||||
|
<nav>
|
||||||
|
<span class="fore-tertiary"><!-- navigation content --></span>
|
||||||
|
</nav>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> We strongly recommend using the <code><nav></code> element in combination with the <a href="grid"><strong>grid</strong></a> module to make your layouts more responsive. For example, you could make your sidebar appear on the left side of your content in medium-sized and larger screens, but move to the very bottom of your content on smaller screens.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="drawer">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Drawer</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div style="height: 15rem;"><br>
|
||||||
|
<style>.drawer.demo { position: absolute; height: 15rem; z-index: 0; top: 6.625rem; height: 12.5rem;} [type="checkbox"]:checked + .drawer.demo { z-index: 1001; margin-left: 0.75rem;}</style>
|
||||||
|
<header><label for="demo-toggle" class="button drawer-toggle persistent"></label></header> <br>
|
||||||
|
<input type="checkbox" id="demo-toggle"> <nav class="drawer demo persistent">
|
||||||
|
<label for="demo-toggle" class="close"></label><a href="#">Home</a> <span>News</span>
|
||||||
|
<a href="#" class="sublink-1">New Courses</a> <a href="#" class="sublink-1">Certifications</a>
|
||||||
|
<span class="sublink-1">Events</span> <a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
|
||||||
|
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a> <a href="#" class="sublink-1">Policy Update</a>
|
||||||
|
<a href="#">About</a> <a href="#">Contact</a><br/></nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The drawer component is used to create responsive and collapsible navigation menus. To create the drawer system, follow the steps presented below:</p>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Inside your <code><header></code> element, add a <code><label></code> element with the <code>.drawer-toggle</code> class (remember to add the <code>.button</code> class to apply the necessary styles).</li>
|
||||||
|
<li>Create an <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> element. Give it an <code class="fore-secondary">id</code> to be able to link it to the necessary interactive elements.</li>
|
||||||
|
<li>Immediately after the previous <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code>, create a <code><div></code> element with the <code>.drawer</code> class. This is where you will put your menu's contents.</li>
|
||||||
|
<li>Add an empty <code><label></code> element inside your <code>.drawer</code>, adding the <code>.close</code> class to it.</li>
|
||||||
|
<li>Finally, link the <code>.drawer-toggle</code> and <code>.close</code> elements to the <code class="fore-secondary">id</code> of your <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code>.</li>
|
||||||
|
</ul>
|
||||||
|
<p style="text-align: justify;">Drawers are responsive and will expand into normal containers on larger screens. If you want to avoid this, add the <code>.persistent</code> class to both your <code>.drawer-toggle</code> and <code>.drawer</code> elements. You can also change the position of the drawer from the left side of the screen to the right by applying the <code>.right</code> class to your <code>.drawer</code> element.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><header>
|
||||||
|
<label for="drawer-checkbox" class="button drawer-toggle"></label>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer">
|
||||||
|
<label for="drawer-checkbox" class="close"></label>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>The <code>.drawer</code> component can be easily and effectively combined with the <a href="grid"><strong>grid</strong></a> module's system and classes, as well as the <a href="utility"><strong>utility</strong></a> module's responsive visibility helper classes to create fully responsive navigation menus.</li>
|
||||||
|
<li>It's best to use the <code>.drawer</code> component in combination with a <code><header></code> element that has the <code>.sticky</code> class (check the last section of this page).</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-first">
|
||||||
|
<pre><nav class="drawer">
|
||||||
|
<label for="drawer-checkbox" class="close"></label>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
</nav></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can apply the <code>.drawer</code> class to a <code><nav></code> element, effectively making your page's navigation menu collapse on smaller screen sizes.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><input type="checkbox" id="drawer-checkbox">
|
||||||
|
<span class="fore-secondary"><!-- Other stuff here --></span>
|
||||||
|
<div class="drawer">
|
||||||
|
<h3>Bad drawer</h3>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The syntax and structure of the drawer container is very strict. Try to follow it exactly as described in this section.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-first col-md-normal">
|
||||||
|
<pre><div class="row">
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer col-md-4">
|
||||||
|
<label for="drawer-checkbox" class="close"></label>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 col-md-8">
|
||||||
|
<p>Page content</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can combine the <code>.drawer</code> component with the grid system, similarly to any other element or component. The <code>.drawer</code> will be displayed as a slide-in menu on smaller screens, but it's part of the layout on medium-sized and larger screens.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last">
|
||||||
|
<pre><header>
|
||||||
|
<label for="drawer-checkbox" class="button drawer-toggle persistent"></label>
|
||||||
|
</header>
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer">...</div>
|
||||||
|
<!-- or -->
|
||||||
|
<header>
|
||||||
|
<label for="drawer-checkbox" class="button drawer-toggle"></label>
|
||||||
|
</header>
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer peristent">...</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Remember to apply the <code>.persistent</code> class to the <code>.drawer-toggle</code> and <code>.drawer</code> elements to avoid unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="footer">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Footer</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<footer> <p>© 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p> </footer> <br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The <code><footer></code> element is used to create your page's footer. As normal, add the <code><footer></code> at or near the end of your <code><body></code> element and add content to it like you would otherwise.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><footer>
|
||||||
|
<p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p>
|
||||||
|
</footer></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="sticky">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Sticky headers and footers</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">You can create sticky headers and footers, using the <code>.sticky</code> class on either of these elements.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><header class="sticky">
|
||||||
|
<a href="#" class="logo">Logo</a> <button>Home</button> <button>About</button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<footer class="sticky">
|
||||||
|
<p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p>
|
||||||
|
</footer></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Sticky headers and footers are compatible with modern browsers, but might not display properly in older browsers. Support is being added over time, so be sure to check out if your target platforms support <a href="http://caniuse.com/#feat=css-sticky"><code>position:sticky</code></a>.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
368
docs/v2/navigation.html~gluon.v3
Normal file
368
docs/v2/navigation.html~gluon.v3
Normal file
|
@ -0,0 +1,368 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Navigation</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, navigation ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-md-normal {box-sizing: border-box; border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media (min-width:768px) and (max-width: 1279px){.col-sm-12.col-sm-last.col-lg-4.col-md-normal {border: 0;border-bottom: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored { color: #f5f5f5;} .col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media (min-width: 1280px) {.col-sm-12.col-sm-last.col-md-12.col-md-normal.col-lg-4.col-lg-normal {border:0; border-right: 1px solid #c9c9c9; }}
|
||||||
|
@media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer#real-drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2" id="real-drawer">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="navigation-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Navigation</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation menus.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Menus and navigation are some of the most important elements for any website or web app and their design and ease-of-use are key factors that can determine a page's bounce rates. The <strong>navigation</strong> module takes a step back from the complicated menu and navigation design paradigms of the modern web, using HTML5 elements (i.e. <code>header</code>, <code>nav</code> and <code>footer</code>) for basic navigation, while providing fully accessibility for screen readers. Apart from the simple horizontal navigation (headers) and vertical menus (sidebars), we opted to add a responsive slide-in drawer menu that works well with any page layout. Finally, footers are also part of the <strong>navigation</strong> module, as they can often provide the user with useful information and/or links that are very important to enhancing their experience.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>navigation</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="header">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Header</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<header>
|
||||||
|
<a href="#" class="logo">Logo</a> <button>Home</button>
|
||||||
|
<a href="#" class="button">News</a> <span>|</span>
|
||||||
|
<button>About</button> <button>Contact</button>
|
||||||
|
</header> <br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The <code><header></code> HTML element is used for a page's top horizontal navigation menu. It can contain a unique <code>.logo</code> element as its first child (this structure is not mandatory, but still recommended as a best practice), which can be either text (with or without a link) or an image. The rest of the elements inside the <code><header></code> must be button elements (i.e. <code><button></code>, <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"button"</span>></code>, <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> or <code>.button</code>) in order to be styled properly. Textual separators between those can be added using <code><span></code> elements.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><header>
|
||||||
|
<a href="#" class="logo">Logo</a>
|
||||||
|
<button>Home</button>
|
||||||
|
<a href="#" class="button">News</a>
|
||||||
|
<span>|</span>
|
||||||
|
<button>About</button>
|
||||||
|
<a href="#" role="button">Contact</a>
|
||||||
|
</header></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>The <code><header></code> element is partially responsive on smaller screen devices. More specifically, when the content inside it exceeds the width of the viewport (ie. overflows to the right), users will be able to scroll horizontally in order to see the rest of the menu.</li>
|
||||||
|
<li>The <code><header></code> element does not display as <code class="fore-tertiary">fixed</code> by default. You can, however, alter this CSS property manually, if you so desire.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><header>
|
||||||
|
<a href="#" class="logo">Logo</a>
|
||||||
|
<button>Action 1</button>
|
||||||
|
<a href="#" class="button">Action 2</a>
|
||||||
|
<label class="button">Action 3</label>
|
||||||
|
</header></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can mix different elements styled like buttons inside a <code><header></code> element. In fact, we strongly recommend doing so, if you need to.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><header>
|
||||||
|
<a href="#" class="button logo">Logo</a>
|
||||||
|
</header>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<header>
|
||||||
|
<a href="#" class="logo">Logo</a>
|
||||||
|
<a href="#">Link</a>
|
||||||
|
</header></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The <code>.logo</code> element should not be a <code><button></code> element, have the <code>.button</code> class or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> attribute. On the other hand, links and labels in the <code><header></code> should not be without a <code>.button</code> class or a <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>"</span></code> attribute. Ignoring this rule might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="navigation-bar">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Navigation bar</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4 col-lg-normal">
|
||||||
|
<div><br>
|
||||||
|
<nav>
|
||||||
|
<a href="#">Home</a> <span>News</span>
|
||||||
|
<a href="#" class="sublink-1">New Courses</a> <a href="#" class="sublink-1">Certifications</a>
|
||||||
|
<span class="sublink-1">Events</span> <a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
|
||||||
|
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a> <a href="#" class="sublink-1">Policy Update</a>
|
||||||
|
<a href="#">About</a> <a href="#">Contact</a>
|
||||||
|
</nav><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8 col-lg-normal">
|
||||||
|
<p style="text-align: justify;">To add vertical navigation to your websites, use the <code><nav></code> HTML element. Adding links is pretty simple, just use <code><a></code> elements, no lists or anything else required. In order to add subcategories to your vertical navigation, use any normal textual element as the title of the subcategory and follow it with its links as normal, adding the <code>.sublink-1</code> class to them. Similarly, you can create a subcategory with a depth of 2, using a similar structure and the <code>.sublink-2</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><nav>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
<span>News</span>
|
||||||
|
<a href="#" class="sublink-1">New Courses</a>
|
||||||
|
<a href="#" class="sublink-1">Certifications</a>
|
||||||
|
<span class="sublink-1">Events</span>
|
||||||
|
<a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
|
||||||
|
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a>
|
||||||
|
<a href="#" class="sublink-1">Policy Update</a>
|
||||||
|
<a href="#">About</a>
|
||||||
|
<a href="#">Contact</a>
|
||||||
|
</nav></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Subcategories and their links support a depth of 2 by default. If, however, you need more than that, we recommend you check the <a href="customization">customization page</a> for instructions on how to add more depth to the vertical navigation.</li>
|
||||||
|
<li>We strongly suggest you do not add irrelevant things inside your <code><nav></code> element, like images or text that are not part of the navigation menu.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="col-sm-12 col-sm-last col-md-3 col-md-first">
|
||||||
|
<nav>
|
||||||
|
<span class="fore-tertiary"><!-- navigation content --></span>
|
||||||
|
</nav>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> We strongly recommend using the <code><nav></code> element in combination with the <a href="grid"><strong>grid</strong></a> module to make your layouts more responsive. For example, you could make your sidebar appear on the left side of your content in medium-sized and larger screens, but move to the very bottom of your content on smaller screens.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="drawer">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Drawer</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div style="height: 15rem;"><br>
|
||||||
|
<style>.drawer.demo { position: absolute; height: 15rem; z-index: 0; top: 6.625rem; height: 12.5rem;} [type="checkbox"]:checked + .drawer.demo { z-index: 1001; margin-left: 0.75rem;}</style>
|
||||||
|
<header><label for="demo-toggle" class="button drawer-toggle persistent"></label></header> <br>
|
||||||
|
<input type="checkbox" id="demo-toggle"> <nav class="drawer demo persistent">
|
||||||
|
<label for="demo-toggle" class="close"></label><a href="#">Home</a> <span>News</span>
|
||||||
|
<a href="#" class="sublink-1">New Courses</a> <a href="#" class="sublink-1">Certifications</a>
|
||||||
|
<span class="sublink-1">Events</span> <a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
|
||||||
|
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a> <a href="#" class="sublink-1">Policy Update</a>
|
||||||
|
<a href="#">About</a> <a href="#">Contact</a><br/></nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The drawer component is used to create responsive and collapsible navigation menus. To create the drawer system, follow the steps presented below:</p>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Inside your <code><header></code> element, add a <code><label></code> element with the <code>.drawer-toggle</code> class (remember to add the <code>.button</code> class to apply the necessary styles).</li>
|
||||||
|
<li>Create an <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code> element. Give it an <code class="fore-secondary">id</code> to be able to link it to the necessary interactive elements.</li>
|
||||||
|
<li>Immediately after the previous <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code>, create a <code><div></code> element with the <code>.drawer</code> class. This is where you will put your menu's contents.</li>
|
||||||
|
<li>Add an empty <code><label></code> element inside your <code>.drawer</code>, adding the <code>.close</code> class to it.</li>
|
||||||
|
<li>Finally, link the <code>.drawer-toggle</code> and <code>.close</code> elements to the <code class="fore-secondary">id</code> of your <code><input <span class="fore-secondary">type</span>="<span class="fore-primary">checkbox</span>"></code>.</li>
|
||||||
|
</ul>
|
||||||
|
<p style="text-align: justify;">Drawers are responsive and will expand into normal containers on larger screens. If you want to avoid this, add the <code>.persistent</code> class to both your <code>.drawer-toggle</code> and <code>.drawer</code> elements. You can also change the position of the drawer from the left side of the screen to the right by applying the <code>.right</code> class to your <code>.drawer</code> element.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><header>
|
||||||
|
<label for="drawer-checkbox" class="button drawer-toggle"></label>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer">
|
||||||
|
<label for="drawer-checkbox" class="close"></label>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>The <code>.drawer</code> component can be easily and effectively combined with the <a href="grid"><strong>grid</strong></a> module's system and classes, as well as the <a href="utility"><strong>utility</strong></a> module's responsive visibility helper classes to create fully responsive navigation menus.</li>
|
||||||
|
<li>It's best to use the <code>.drawer</code> component in combination with a <code><header></code> element that has the <code>.sticky</code> class (check the last section of this page).</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-first">
|
||||||
|
<pre><nav class="drawer">
|
||||||
|
<label for="drawer-checkbox" class="close"></label>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
</nav></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can apply the <code>.drawer</code> class to a <code><nav></code> element, effectively making your page's navigation menu collapse on smaller screen sizes.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><input type="checkbox" id="drawer-checkbox">
|
||||||
|
<span class="fore-secondary"><!-- Other stuff here --></span>
|
||||||
|
<div class="drawer">
|
||||||
|
<h3>Bad drawer</h3>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The syntax and structure of the drawer container is very strict. Try to follow it exactly as described in this section.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-first col-md-normal">
|
||||||
|
<pre><div class="row">
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer col-md-4">
|
||||||
|
<label for="drawer-checkbox" class="close"></label>
|
||||||
|
<a href="#">Home</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 col-md-8">
|
||||||
|
<p>Page content</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can combine the <code>.drawer</code> component with the grid system, similarly to any other element or component. The <code>.drawer</code> will be displayed as a slide-in menu on smaller screens, but it's part of the layout on medium-sized and larger screens.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last">
|
||||||
|
<pre><header>
|
||||||
|
<label for="drawer-checkbox" class="button drawer-toggle persistent"></label>
|
||||||
|
</header>
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer">...</div>
|
||||||
|
<!-- or -->
|
||||||
|
<header>
|
||||||
|
<label for="drawer-checkbox" class="button drawer-toggle"></label>
|
||||||
|
</header>
|
||||||
|
<input type="checkbox" id="drawer-checkbox">
|
||||||
|
<div class="drawer peristent">...</div></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Remember to apply the <code>.persistent</code> class to the <code>.drawer-toggle</code> and <code>.drawer</code> elements to avoid unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="footer">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Footer</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-lg-4 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<footer> <p>© 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p> </footer> <br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-lg-8 col-md-normal">
|
||||||
|
<p style="text-align: justify;">The <code><footer></code> element is used to create your page's footer. As normal, add the <code><footer></code> at or near the end of your <code><body></code> element and add content to it like you would otherwise.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><footer>
|
||||||
|
<p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p>
|
||||||
|
</footer></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="sticky">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Sticky headers and footers</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">You can create sticky headers and footers, using the <code>.sticky</code> class on either of these elements.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><header class="sticky">
|
||||||
|
<a href="#" class="logo">Logo</a> <button>Home</button> <button>About</button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<footer class="sticky">
|
||||||
|
<p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p>
|
||||||
|
</footer></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Sticky headers and footers are compatible with modern browsers, but might not display properly in older browsers. Support is being added over time, so be sure to check out if your target platforms support <a href="http://caniuse.com/#feat=css-sticky"><code>position:sticky</code></a>.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
251
docs/v2/progress.html~HEAD
Normal file
251
docs/v2/progress.html~HEAD
Normal file
|
@ -0,0 +1,251 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Progress</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, progress ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
|
||||||
|
.box-colored.red { background: #e53935; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="progress-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Progress</h1>
|
||||||
|
<p style="text-align:justify">The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Progress indicators are very common UI elements for almost any website and web app, as they help communicate vital information such as the fact that a process is being executed in the background, informing the user that they should wait for it to complete before proceeding. The <strong>progress</strong> module provides you with two essential tools to communicate this information: the <code><progress></code> HTML element, which is pre-styled and compatible with modern browsers to help you communicate information about the percentage of a task and the <code>.spinner-donut</code> class that allows you to create an animated spinner that communicates that something is loading currently and will continue doing so for an indefinite amount of time. Both elements come with their own color and size variants and are fully accessible.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>progress</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="basic-progress-bar">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic progress bar</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<p>Process is 0% complete!</p> <progress value="0" max="1000"></progress>
|
||||||
|
<p>Process is 45% complete!</p> <progress value="450" max="1000"></progress>
|
||||||
|
<p>Process is 100% complete!</p> <progress value="1000" max="1000"></progress>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">To create a progress bar, use the <code><progress></code> HTML element, specify the preset maximum of <code><span class="fore-secondary">max</span>=<span class="fore-primary">"1000"</span></code> and set a <code>value</code> between <code>0</code> and <code>1000</code>. Update your <code><progress></code> element using some Javascript code, by changing its <code>value</code> to any integer in the same range.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><progress value="0" max="1000"></progress>
|
||||||
|
<progress value="450" max="1000"></progress>
|
||||||
|
<progress value="1000" max="1000"></progress></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>We made sure that the <code><progress></code> element displays properly on all modern browsers, using browser-specific rules. However, there might be some irregularities with older browsers, especially legacy versions of Internet Explorer.</li>
|
||||||
|
<li>If the preset <code>max="1000"</code> does not suit your needs, you should check the <a href="customization">customization page</a> for instructions on how to set your own maximum value for the <code><progress></code> element.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><progress value="80" max="100"></progress></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid using different values for the <code><progress></code> element's <code>max</code>, except for the preset one (<code>1000</code>).</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><progress value="450.5" max="1000.0"></progress></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Try not to use floating point values for either the <code><progress></code> element's <code>value</code> or <code>max</code>. During testing of the module, we found that floating point values could cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="progress-variants">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Progress bar variants</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<p>Secondary process is 60% complete!</p> <progress class="secondary" value="600" max="1000"></progress>
|
||||||
|
<p>Tertiary process is 30% complete!</p> <progress class="tertiary" value="300" max="1000"></progress>
|
||||||
|
<p>Inline progress bar:<progress class="inline" value="150" max="1000"></progress></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Apart from the default style for the <code><progress></code> element, we have also included a couple of variants for it. As with many other elements, you can change the color of your progress bars, based on the context, using the <code>.secondary</code> or <code>.tertiary</code> class. You can also make a <code><progress></code> element display inline, using the <code>.inline</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><progress class="secondary" value="600" max="1000"></progress>
|
||||||
|
<progress class="tertiary" value="300" max="1000"></progress>
|
||||||
|
<progress class="inline" value="150" max="1000"></progress></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>If you want to add your own custom size classes for <code><progress></code> elements, check the <a href="customization">customization page</a> for instructions.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><progress class="inline secondary" value="800" max="1000"></progress>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<progress class="inline tertiary" value="650" max="1000"></progress></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can mix size and color classes for <code><progress></code> elements as needed.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><progress class="secondary teriary" value="450" max="1000"></progress></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid mixing two classes of the same type (i.e. two color classes or two size classes).</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="donut-spinner">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Donut spinner</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div class="box-centered"><br>
|
||||||
|
<div class="spinner-donut"></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Donut spinners can be used to indicate that something is loading or that a process is running in the background. To create a donut spinner, add the <code>.spinner-donut</code> class to an element of your liking. We would recommend using a <code><div></code> element for most cases, but <code><span></code> elements should work pretty well, too.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="spinner-donut"></div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>The <code>.spinner-donut</code> is an animated component, meaning that if a browsers does not support animation, this element might display incorrectly.</li>
|
||||||
|
<li>In certain cases, it might be useful to add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_progressbar_role">progressbar</a>"</span></code> attribute to increase donut spinner accessibility.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><p>Loading... <span class="spinner-donut"></span></p></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can place a <code>.spinner-donut</code> inside a paragraph or some other textual context and it will display inline.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="spinner-donut">Loading...</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid inserting text inside the <code>.spinner-donut</code>, as this might cause unexpected bahavior and will probably make the text spin along with it.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="spinner-variants">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Donut spinner variants</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div class="box-centered"><br>
|
||||||
|
<div class="spinner-donut secondary"></div><br> <div class="spinner-donut tertiary"></div><br> <div class="spinner-donut large"></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Apart from the default donut spinner style, there are also two more contextual color classes: <code>.secondary</code> and <code>.tertiary</code>. If your donut spinners are too small, you can also use the <code>.large</code> class to make it pop out a little bit more.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="spinner-donut secondary"></div>
|
||||||
|
<div class="spinner-donut tertiary"></div>
|
||||||
|
<div class="spinner-donut large"></div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>You can mix one of the contextual color classes and the <code>.large</code> class, if you want, similarly to what you can do with progress bars.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
251
docs/v2/progress.html~gluon.v3
Normal file
251
docs/v2/progress.html~gluon.v3
Normal file
|
@ -0,0 +1,251 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Progress</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, progress ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
|
||||||
|
.box-colored.red { background: #e53935; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="progress-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Progress</h1>
|
||||||
|
<p style="text-align:justify">The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Progress indicators are very common UI elements for almost any website and web app, as they help communicate vital information such as the fact that a process is being executed in the background, informing the user that they should wait for it to complete before proceeding. The <strong>progress</strong> module provides you with two essential tools to communicate this information: the <code><progress></code> HTML element, which is pre-styled and compatible with modern browsers to help you communicate information about the percentage of a task and the <code>.spinner-donut</code> class that allows you to create an animated spinner that communicates that something is loading currently and will continue doing so for an indefinite amount of time. Both elements come with their own color and size variants and are fully accessible.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>progress</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="basic-progress-bar">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic progress bar</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<p>Process is 0% complete!</p> <progress value="0" max="1000"></progress>
|
||||||
|
<p>Process is 45% complete!</p> <progress value="450" max="1000"></progress>
|
||||||
|
<p>Process is 100% complete!</p> <progress value="1000" max="1000"></progress>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">To create a progress bar, use the <code><progress></code> HTML element, specify the preset maximum of <code><span class="fore-secondary">max</span>=<span class="fore-primary">"1000"</span></code> and set a <code>value</code> between <code>0</code> and <code>1000</code>. Update your <code><progress></code> element using some Javascript code, by changing its <code>value</code> to any integer in the same range.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><progress value="0" max="1000"></progress>
|
||||||
|
<progress value="450" max="1000"></progress>
|
||||||
|
<progress value="1000" max="1000"></progress></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>We made sure that the <code><progress></code> element displays properly on all modern browsers, using browser-specific rules. However, there might be some irregularities with older browsers, especially legacy versions of Internet Explorer.</li>
|
||||||
|
<li>If the preset <code>max="1000"</code> does not suit your needs, you should check the <a href="customization">customization page</a> for instructions on how to set your own maximum value for the <code><progress></code> element.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><progress value="80" max="100"></progress></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid using different values for the <code><progress></code> element's <code>max</code>, except for the preset one (<code>1000</code>).</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><progress value="450.5" max="1000.0"></progress></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Try not to use floating point values for either the <code><progress></code> element's <code>value</code> or <code>max</code>. During testing of the module, we found that floating point values could cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="progress-variants">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Progress bar variants</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<p>Secondary process is 60% complete!</p> <progress class="secondary" value="600" max="1000"></progress>
|
||||||
|
<p>Tertiary process is 30% complete!</p> <progress class="tertiary" value="300" max="1000"></progress>
|
||||||
|
<p>Inline progress bar:<progress class="inline" value="150" max="1000"></progress></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Apart from the default style for the <code><progress></code> element, we have also included a couple of variants for it. As with many other elements, you can change the color of your progress bars, based on the context, using the <code>.secondary</code> or <code>.tertiary</code> class. You can also make a <code><progress></code> element display inline, using the <code>.inline</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><progress class="secondary" value="600" max="1000"></progress>
|
||||||
|
<progress class="tertiary" value="300" max="1000"></progress>
|
||||||
|
<progress class="inline" value="150" max="1000"></progress></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>If you want to add your own custom size classes for <code><progress></code> elements, check the <a href="customization">customization page</a> for instructions.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><progress class="inline secondary" value="800" max="1000"></progress>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<progress class="inline tertiary" value="650" max="1000"></progress></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can mix size and color classes for <code><progress></code> elements as needed.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><progress class="secondary teriary" value="450" max="1000"></progress></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid mixing two classes of the same type (i.e. two color classes or two size classes).</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="donut-spinner">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Donut spinner</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div class="box-centered"><br>
|
||||||
|
<div class="spinner-donut"></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Donut spinners can be used to indicate that something is loading or that a process is running in the background. To create a donut spinner, add the <code>.spinner-donut</code> class to an element of your liking. We would recommend using a <code><div></code> element for most cases, but <code><span></code> elements should work pretty well, too.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="spinner-donut"></div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>The <code>.spinner-donut</code> is an animated component, meaning that if a browsers does not support animation, this element might display incorrectly.</li>
|
||||||
|
<li>In certain cases, it might be useful to add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_progressbar_role">progressbar</a>"</span></code> attribute to increase donut spinner accessibility.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><p>Loading... <span class="spinner-donut"></span></p></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can place a <code>.spinner-donut</code> inside a paragraph or some other textual context and it will display inline.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="spinner-donut">Loading...</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid inserting text inside the <code>.spinner-donut</code>, as this might cause unexpected bahavior and will probably make the text spin along with it.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="spinner-variants">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Donut spinner variants</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div class="box-centered"><br>
|
||||||
|
<div class="spinner-donut secondary"></div><br> <div class="spinner-donut tertiary"></div><br> <div class="spinner-donut large"></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Apart from the default donut spinner style, there are also two more contextual color classes: <code>.secondary</code> and <code>.tertiary</code>. If your donut spinners are too small, you can also use the <code>.large</code> class to make it pop out a little bit more.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="spinner-donut secondary"></div>
|
||||||
|
<div class="spinner-donut tertiary"></div>
|
||||||
|
<div class="spinner-donut large"></div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>You can mix one of the contextual color classes and the <code>.large</code> class, if you want, similarly to what you can do with progress bars.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
314
docs/v2/tab.html~HEAD
Normal file
314
docs/v2/tab.html~HEAD
Normal file
|
@ -0,0 +1,314 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Tab</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, tab, tabs ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media (max-width: 1279px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box; border: 0; border-bottom: 1px solid #c9c9c9;}}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="tab-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Tab</h1>
|
||||||
|
<p style="text-align:justify">The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Spoilers, collapses, accordions, tabs, carousels have been a staple of modern design for quite a long time. All of these elements are implemented using the <strong>tab</strong> module's single generic container. The tab container replaces all of these design paradigms with one component that is very flexible and responsive in order to let you present your website or app's content any way you like. Tabbed navigation is very easy to implement, while collapse, accordion and carousel components use the stacked architecture of tabs. As usual, the tab container is responsive and accessible, allowing you to deliver your content properly to all devices and users.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>tab</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="basic-syntax">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic syntax</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4">
|
||||||
|
<div class="tabs" style="margin-top: 5px; margin-bottom: 5px;">
|
||||||
|
<input type="radio" name="tabdemo" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div> <h3>Tab 1</h3> <p>This is the first tab's content.</p> </div>
|
||||||
|
<input type="radio" name="tabdemo" id="tab2" aria-hidden="true">
|
||||||
|
<label for="tab2" aria-hidden="true">Tab 2</label>
|
||||||
|
<div> <h3>Tab 2</h3> <p>This is the second tab's content.</p> </div>
|
||||||
|
<input type="radio" name="tabdemo" id="tab3" aria-hidden="true">
|
||||||
|
<label for="tab3" aria-hidden="true">Tab 3</label>
|
||||||
|
<div> <h3>Tab 3</h3> <p>This is the third tab's content.</p> </div>
|
||||||
|
<input type="radio" name="tabdemo" id="tab4" aria-hidden="true">
|
||||||
|
<label for="tab4" aria-hidden="true">Tab 4</label>
|
||||||
|
<div> <h3>Tab 4</h3> <p>This is the fourth tab's content.</p> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8">
|
||||||
|
<p style="text-align:justify">The tab container's basic syntax is composed of two components, presented below in the order they should be added to the DOM tree:</p>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>At the outermost level of the tab container is a <code><div></code> element implementing the <code>.tabs</code> class. This serves as the wrapper of the tab container.</li>
|
||||||
|
<li>Inside the <code>.tabs</code> container, add a set of the following three elements for each tab:
|
||||||
|
<ol>
|
||||||
|
<li>First, add an <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"radio"</span>></code> element. Give it a <code><span class="fore-secondary">name</span></code> and an <code><span class="fore-secondary">id</span></code> in order to be able to link to it and group it with the rest of the radio buttons in the container.</li>
|
||||||
|
<li>Follow the <code><input></code> element with a <code><label></code> element linking to it. Inside this element, add the text you want to be shown as the title of your tab.</li>
|
||||||
|
<li>Finally, add a <code><div></code> immediately after the <code><label></code>'s closing tag. This will be the panel that contains the tab's content. Inside this element, you can add all the content you want in your tab (headings, images, text).</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p style="text-align:justify">Tabs are responsive and will collapse into a stacked display on smaller screens, allowing the user to view the actual content more easily. The tab container's syntax is accessible, but parts of it might confuse screen readers, so we suggest adding the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to all the <code><input></code> and <code><label></code> elements inside the <code>.tabs</code> container.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Tab 1</h3>
|
||||||
|
<p>This is the first tab's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="radio" name="tab-group" id="tab2" aria-hidden="true">
|
||||||
|
<label for="tab2" aria-hidden="true">Tab 2</label>
|
||||||
|
<div>
|
||||||
|
<h3>Tab 2</h3>
|
||||||
|
<p>This is the second tab's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="radio" name="tab-group" id="tab3" aria-hidden="true">
|
||||||
|
<label for="tab3" aria-hidden="true">Tab 3</label>
|
||||||
|
<div>
|
||||||
|
<h3>Tab 3</h3>
|
||||||
|
<p>This is the third tab's content.</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Tabs are compatible with modern browsers, but might not display properly in older browsers.</li>
|
||||||
|
<li>Remember to add the <code><span class="fore-secondary">checked</span></code> attribute to one of your <code><input></code>s if you want that tab to be the one displayed by default. If none is specified, the first one will be displayed.</li>
|
||||||
|
<li>The <code>height</code> of the tab container's panel area is <code>400px</code>. If you want to change this default size, please check out the <a href="customization">customization</a> page.</li>
|
||||||
|
<li>Using the method described above for making tabs accessible, screen readers will ignore tab controls and only read the content of tabs.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="checkbox" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Bad Tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Do not use checkboxes inside the default <code>.tabs</code> container, otherwise you might notice unexpected behavior. If you want to use an <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"checkbox"</span>></code>, check out the next section.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Lonely Tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> You can add a single tab in a <code>.tabs</code> container, but what use would that be? You should probably read the next section to see what you can do with a stacked tab container instead.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<input type="radio" name="tab-group" id="tab2" aria-hidden="true">
|
||||||
|
<label for="tab2" aria-hidden="true">Tab 2</label>
|
||||||
|
<div>
|
||||||
|
<h3>Bad Tab</h3>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3>Bad Tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> The syntax and structure of the tab container is very strict. Try to follow it exactly as described in this section.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked>
|
||||||
|
<label for="tab1">Tab</label>
|
||||||
|
<div>
|
||||||
|
<h3>Not fully accessible tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to make your tabs fully accessible.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="stacked-tabs">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Stacked tabs</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4">
|
||||||
|
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
|
||||||
|
<input type="radio" name="accordion" id="a1" checked aria-hidden="true">
|
||||||
|
<label for="a1" aria-hidden="true">Accordion section 1</label>
|
||||||
|
<div> <h3>Section 1</h3> <p>This is the first accordion section's content.</p> </div>
|
||||||
|
<input type="radio" name="accordion" id="a2" aria-hidden="true">
|
||||||
|
<label for="a2" aria-hidden="true">Accordion section 2</label>
|
||||||
|
<div> <h3>Section 2</h3> <p>This is the second accordion section's content.</p> </div>
|
||||||
|
</div>
|
||||||
|
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
|
||||||
|
<input type="checkbox" id="c1" aria-hidden="true">
|
||||||
|
<label for="c1" aria-hidden="true">Collapse section 1</label>
|
||||||
|
<div> <p>This is the first collapse section's content.</p> </div>
|
||||||
|
<input type="checkbox" id="c2" aria-hidden="true">
|
||||||
|
<label for="c2" aria-hidden="true">Collapse section 2</label>
|
||||||
|
<div> <p>This is the second collapse section's content.</p> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8">
|
||||||
|
<p style="text-align:justify">Apart from the normal tab layout, you can make your tabs stacked instead, using the <code>.stacked</code> class in your <code>.tabs</code> container element. Stacked tabs are more versatile, allowing you to use checkboxes and/or radio buttons to implement collapses, accordions and spoilers. Carousel-styled elements can also be displayed in this fashion, if you wish. Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to make your tabs fully accessible, as before.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="tabs stacked">
|
||||||
|
<input type="radio" name="accordion" id="a1" checked aria-hidden="true">
|
||||||
|
<label for="a1" aria-hidden="true">Accordion section 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Section 1</h3>
|
||||||
|
<p>This is the first accordion section's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="radio" name="accordion" id="a2"aria-hidden="true">
|
||||||
|
<label for="a2" aria-hidden="true">Accordion section 2</label>
|
||||||
|
<div>
|
||||||
|
<h3>Section 2</h3>
|
||||||
|
<p>This is the second accordion section's content.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="c1" aria-hidden="true">
|
||||||
|
<label for="c1" aria-hidden="true">Collapse section 1</label>
|
||||||
|
<div>
|
||||||
|
<p>This is the first collapse section's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="checkbox" id="c2" aria-hidden="true">
|
||||||
|
<label for="c2" aria-hidden="true">Collapse section 2</label>
|
||||||
|
<div>
|
||||||
|
<p>This is the second collapse section's content.</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li><code>.stacked</code> tabs can be used with either checkboxes or radio buttons.</li>
|
||||||
|
<li>You can mix and match checkboxes and radio buttons, but we suggest you do not do so, unless you think it is necessary for your design.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="c1" aria-hidden="true">
|
||||||
|
<label for="c1" aria-hidden="true">Single collapse</label>
|
||||||
|
<div>
|
||||||
|
<p>This is a singular collapse.</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can implement single collapses (otherwise known as spoilers), using a <code>.tabs</code><code>.stacked</code> container with only one checkbox-based tab.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs stacked">
|
||||||
|
<input type="radio" name="accordion" id="a1" checked aria-hidden="true">
|
||||||
|
<label for="a1" aria-hidden="true">Single accordion section</label>
|
||||||
|
<div>
|
||||||
|
<p>This accordion section cannot close once opened</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid having a single radio-based tab in a <code>.tabs</code><code>.stacked</code> container, as this might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
314
docs/v2/tab.html~gluon.v3
Normal file
314
docs/v2/tab.html~gluon.v3
Normal file
|
@ -0,0 +1,314 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Tab</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, tab, tabs ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-lg-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5;} @media (max-width: 1279px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box; border: 0; border-bottom: 1px solid #c9c9c9;}}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="tab-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Tab</h1>
|
||||||
|
<p style="text-align:justify">The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Spoilers, collapses, accordions, tabs, carousels have been a staple of modern design for quite a long time. All of these elements are implemented using the <strong>tab</strong> module's single generic container. The tab container replaces all of these design paradigms with one component that is very flexible and responsive in order to let you present your website or app's content any way you like. Tabbed navigation is very easy to implement, while collapse, accordion and carousel components use the stacked architecture of tabs. As usual, the tab container is responsive and accessible, allowing you to deliver your content properly to all devices and users.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>tab</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="basic-syntax">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic syntax</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4">
|
||||||
|
<div class="tabs" style="margin-top: 5px; margin-bottom: 5px;">
|
||||||
|
<input type="radio" name="tabdemo" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div> <h3>Tab 1</h3> <p>This is the first tab's content.</p> </div>
|
||||||
|
<input type="radio" name="tabdemo" id="tab2" aria-hidden="true">
|
||||||
|
<label for="tab2" aria-hidden="true">Tab 2</label>
|
||||||
|
<div> <h3>Tab 2</h3> <p>This is the second tab's content.</p> </div>
|
||||||
|
<input type="radio" name="tabdemo" id="tab3" aria-hidden="true">
|
||||||
|
<label for="tab3" aria-hidden="true">Tab 3</label>
|
||||||
|
<div> <h3>Tab 3</h3> <p>This is the third tab's content.</p> </div>
|
||||||
|
<input type="radio" name="tabdemo" id="tab4" aria-hidden="true">
|
||||||
|
<label for="tab4" aria-hidden="true">Tab 4</label>
|
||||||
|
<div> <h3>Tab 4</h3> <p>This is the fourth tab's content.</p> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8">
|
||||||
|
<p style="text-align:justify">The tab container's basic syntax is composed of two components, presented below in the order they should be added to the DOM tree:</p>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>At the outermost level of the tab container is a <code><div></code> element implementing the <code>.tabs</code> class. This serves as the wrapper of the tab container.</li>
|
||||||
|
<li>Inside the <code>.tabs</code> container, add a set of the following three elements for each tab:
|
||||||
|
<ol>
|
||||||
|
<li>First, add an <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"radio"</span>></code> element. Give it a <code><span class="fore-secondary">name</span></code> and an <code><span class="fore-secondary">id</span></code> in order to be able to link to it and group it with the rest of the radio buttons in the container.</li>
|
||||||
|
<li>Follow the <code><input></code> element with a <code><label></code> element linking to it. Inside this element, add the text you want to be shown as the title of your tab.</li>
|
||||||
|
<li>Finally, add a <code><div></code> immediately after the <code><label></code>'s closing tag. This will be the panel that contains the tab's content. Inside this element, you can add all the content you want in your tab (headings, images, text).</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p style="text-align:justify">Tabs are responsive and will collapse into a stacked display on smaller screens, allowing the user to view the actual content more easily. The tab container's syntax is accessible, but parts of it might confuse screen readers, so we suggest adding the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to all the <code><input></code> and <code><label></code> elements inside the <code>.tabs</code> container.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Tab 1</h3>
|
||||||
|
<p>This is the first tab's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="radio" name="tab-group" id="tab2" aria-hidden="true">
|
||||||
|
<label for="tab2" aria-hidden="true">Tab 2</label>
|
||||||
|
<div>
|
||||||
|
<h3>Tab 2</h3>
|
||||||
|
<p>This is the second tab's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="radio" name="tab-group" id="tab3" aria-hidden="true">
|
||||||
|
<label for="tab3" aria-hidden="true">Tab 3</label>
|
||||||
|
<div>
|
||||||
|
<h3>Tab 3</h3>
|
||||||
|
<p>This is the third tab's content.</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Tabs are compatible with modern browsers, but might not display properly in older browsers.</li>
|
||||||
|
<li>Remember to add the <code><span class="fore-secondary">checked</span></code> attribute to one of your <code><input></code>s if you want that tab to be the one displayed by default. If none is specified, the first one will be displayed.</li>
|
||||||
|
<li>The <code>height</code> of the tab container's panel area is <code>400px</code>. If you want to change this default size, please check out the <a href="customization">customization</a> page.</li>
|
||||||
|
<li>Using the method described above for making tabs accessible, screen readers will ignore tab controls and only read the content of tabs.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="checkbox" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Bad Tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Do not use checkboxes inside the default <code>.tabs</code> container, otherwise you might notice unexpected behavior. If you want to use an <code><input <span class="fore-secondary">type</span>=<span class="fore-primary">"checkbox"</span>></code>, check out the next section.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Lonely Tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> You can add a single tab in a <code>.tabs</code> container, but what use would that be? You should probably read the next section to see what you can do with a stacked tab container instead.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked aria-hidden="true">
|
||||||
|
<label for="tab1" aria-hidden="true">Tab 1</label>
|
||||||
|
<input type="radio" name="tab-group" id="tab2" aria-hidden="true">
|
||||||
|
<label for="tab2" aria-hidden="true">Tab 2</label>
|
||||||
|
<div>
|
||||||
|
<h3>Bad Tab</h3>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3>Bad Tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> The syntax and structure of the tab container is very strict. Try to follow it exactly as described in this section.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs">
|
||||||
|
<input type="radio" name="tab-group" id="tab1" checked>
|
||||||
|
<label for="tab1">Tab</label>
|
||||||
|
<div>
|
||||||
|
<h3>Not fully accessible tab</h3>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to make your tabs fully accessible.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="stacked-tabs">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Stacked tabs</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal col-lg-4">
|
||||||
|
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
|
||||||
|
<input type="radio" name="accordion" id="a1" checked aria-hidden="true">
|
||||||
|
<label for="a1" aria-hidden="true">Accordion section 1</label>
|
||||||
|
<div> <h3>Section 1</h3> <p>This is the first accordion section's content.</p> </div>
|
||||||
|
<input type="radio" name="accordion" id="a2" aria-hidden="true">
|
||||||
|
<label for="a2" aria-hidden="true">Accordion section 2</label>
|
||||||
|
<div> <h3>Section 2</h3> <p>This is the second accordion section's content.</p> </div>
|
||||||
|
</div>
|
||||||
|
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
|
||||||
|
<input type="checkbox" id="c1" aria-hidden="true">
|
||||||
|
<label for="c1" aria-hidden="true">Collapse section 1</label>
|
||||||
|
<div> <p>This is the first collapse section's content.</p> </div>
|
||||||
|
<input type="checkbox" id="c2" aria-hidden="true">
|
||||||
|
<label for="c2" aria-hidden="true">Collapse section 2</label>
|
||||||
|
<div> <p>This is the second collapse section's content.</p> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal col-lg-8">
|
||||||
|
<p style="text-align:justify">Apart from the normal tab layout, you can make your tabs stacked instead, using the <code>.stacked</code> class in your <code>.tabs</code> container element. Stacked tabs are more versatile, allowing you to use checkboxes and/or radio buttons to implement collapses, accordions and spoilers. Carousel-styled elements can also be displayed in this fashion, if you wish. Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> attribute to make your tabs fully accessible, as before.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="tabs stacked">
|
||||||
|
<input type="radio" name="accordion" id="a1" checked aria-hidden="true">
|
||||||
|
<label for="a1" aria-hidden="true">Accordion section 1</label>
|
||||||
|
<div>
|
||||||
|
<h3>Section 1</h3>
|
||||||
|
<p>This is the first accordion section's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="radio" name="accordion" id="a2"aria-hidden="true">
|
||||||
|
<label for="a2" aria-hidden="true">Accordion section 2</label>
|
||||||
|
<div>
|
||||||
|
<h3>Section 2</h3>
|
||||||
|
<p>This is the second accordion section's content.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="c1" aria-hidden="true">
|
||||||
|
<label for="c1" aria-hidden="true">Collapse section 1</label>
|
||||||
|
<div>
|
||||||
|
<p>This is the first collapse section's content.</p>
|
||||||
|
</div>
|
||||||
|
<input type="checkbox" id="c2" aria-hidden="true">
|
||||||
|
<label for="c2" aria-hidden="true">Collapse section 2</label>
|
||||||
|
<div>
|
||||||
|
<p>This is the second collapse section's content.</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li><code>.stacked</code> tabs can be used with either checkboxes or radio buttons.</li>
|
||||||
|
<li>You can mix and match checkboxes and radio buttons, but we suggest you do not do so, unless you think it is necessary for your design.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="c1" aria-hidden="true">
|
||||||
|
<label for="c1" aria-hidden="true">Single collapse</label>
|
||||||
|
<div>
|
||||||
|
<p>This is a singular collapse.</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can implement single collapses (otherwise known as spoilers), using a <code>.tabs</code><code>.stacked</code> container with only one checkbox-based tab.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><div class="tabs stacked">
|
||||||
|
<input type="radio" name="accordion" id="a1" checked aria-hidden="true">
|
||||||
|
<label for="a1" aria-hidden="true">Single accordion section</label>
|
||||||
|
<div>
|
||||||
|
<p>This accordion section cannot close once opened</p>
|
||||||
|
</div>
|
||||||
|
</div></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid having a single radio-based tab in a <code>.tabs</code><code>.stacked</code> container, as this might result in unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
522
docs/v2/table.html~HEAD
Normal file
522
docs/v2/table.html~HEAD
Normal file
|
@ -0,0 +1,522 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Table</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, table ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5; } @media (max-width: 767px){.container#co {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
table#carded { border-collapse: collapse;border: 0;width: 100%; box-shadow: none; }
|
||||||
|
table#carded thead, table#carded th { border: 0;height: 1px;width: 1px; margin: -1px; overflow: hidden; padding: 0;position: absolute;clip: rect(0 0 0 0); -webkit-clip-path: inset(100%); clip-path: inset(100%); }
|
||||||
|
table#carded tr {display: block;border: 1px solid #c9c9c9;box-shadow: none;background: #fafafa; margin-bottom: 0.625rem; }
|
||||||
|
table#carded td {display: block;border: 0; border-bottom: 1px solid #c9c9c9; text-align: right; }
|
||||||
|
table#carded td:before { content: attr(data-label); float: left; font-weight: 700; }
|
||||||
|
table#carded td:last-child { border-bottom: 0; } .border-fix > td, .border-fix > th { border-top: 0; }.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #c9c9c9;} @media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="table-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Table</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Presenting information the right way is very important, especially so when dealing with large amounts of data. The <strong>table</strong> module reinvents tabular data presentation, using modern styling and responsiveness to help make tables fun again for all users no matter the device size. Tables can be either vertical or horizontal, both collapsing to a card view on smaller devices, so that they are easier to view properly. Horizontal tables are also flexible, allowing you to take as little space as possible, while still providing your users with a pleasant way to view their data. Finally, like in most CSS frameworks nowadays, you can stripe your tables to make reading them slightly less tiresome for your users' eyes. Note that all of the table variants are fully accessible.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>table</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="syntax-responsiveness">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic syntax & responsiveness</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<h4>Medium/Large screen layout</h4><hr>
|
||||||
|
<table class="preset">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<h4>Small screen layout</h4><hr>
|
||||||
|
<table id="carded">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Table layout utilizes the <code><table></code> HTML element with the following structure (usual tabular structure):</p>
|
||||||
|
<ol style="text-align: justify;">
|
||||||
|
<li>On the outermost level, there is the <code><table></code> element.</li>
|
||||||
|
<li>If you want to include a <code><caption></code> element, it must by the first element inside the <code><table></code> element.</li>
|
||||||
|
<li>Following the above, you need to add a <code><thead></code> element. Inside it, you should usually add one <code><tr></code> element, which contains one or more <code><th></code> elements.</li>
|
||||||
|
<li>Immediately after the <code><thead></code> element, you can add a <code><tfoot></code> element, if you want to. Inside it, you should usually add one or more <code><tr></code> elements, which contain one or more <code><td></code> elements. </li>
|
||||||
|
<li>Finally, add your <code><tbody></code> element. Inside it, you should usually add one or more <code><tr></code> elements, which contain one or more <code><td></code> elements. For each <code><td></code> element, specify a <code>data-label</code> attribute equal to the heading of the column. This enables responsibility for your table, so that the values in the columns will be properly labeled on mobile devices.</li>
|
||||||
|
</ol>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><table>
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Surname</th>
|
||||||
|
<th>Alias</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
<td data-label="Surname">Wilberts</td>
|
||||||
|
<td data-label="Alias">MrOne</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Adam</td>
|
||||||
|
<td data-label="Surname">Smith</td>
|
||||||
|
<td data-label="Alias">TheSmith</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Sophia</td>
|
||||||
|
<td data-label="Surname">Canderson</td>
|
||||||
|
<td data-label="Alias">Candee</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Tables are responsive by default and will change to a card-like view below a certain screen width. If you'd rather not make them responsive, check the last section on this page.</li>
|
||||||
|
<li>Specifying the <code>data-label</code> attribute is essential for the responsive version of a table to display properly. You can, however, use a value different from the column's name. Make sure it does not confuse your users, though.</li>
|
||||||
|
<li>We strongly suggest you avoid adding multiple rows in your <code><thead></code> element, as it could cause problems with accessibility. However, if you absolutely must, you might want to check <a href="http://codepen.io/chalarangelo/pen/VPqWQE">this codepen</a> for an idea on how to deal with irregular border styling.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><tr>
|
||||||
|
<td>Chad</td>
|
||||||
|
<td>Wilberts</td>
|
||||||
|
<td>MrOne</td>
|
||||||
|
</tr></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Remember to always add a <code>data-label</code> attribute to your <code><td></code> elements, as the table's card view is very dependent on them to display properly. <code><th></code> elements, however, do not require or utilize this attribute.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><table>
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</tfoot>
|
||||||
|
</table></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The <code><tfoot></code> element must always be immediately after the <code><thead></code> element, if included.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
</tr>
|
||||||
|
</tbody></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid inserting <code><th></code> elements inside your <code><tbody></code> element. If you want to make your tables horizontal or preset their styling in a manner different from the one shown in the previous examples, check the below sections.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><thead>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
</tr>
|
||||||
|
</thead></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using <code><td></code> elements inside your <code><thead></code>. You should use a <code><tbody></code> element instead.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="scrollable-tables">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Scrollable tables</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br><table class="scrollable preset">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
|
||||||
|
<tr><td data-label="Name">Mark</td><td data-label="Surname">Gerkis</td><td data-label="Alias">Markie</td></tr>
|
||||||
|
<tr><td data-label="Name">John</td><td data-label="Surname">Fergusson</td><td data-label="Alias">Fergujohn</td></tr>
|
||||||
|
<tr><td data-label="Name">Sylvia</td><td data-label="Surname">Pouleau</td><td data-label="Alias">Sylver</td></tr>
|
||||||
|
<tr><td data-label="Name">Norman</td><td data-label="Surname">Jones</td><td data-label="Alias">NormalJones</td></tr>
|
||||||
|
<tr><td data-label="Name">Trevor</td><td data-label="Surname">Heidel</td><td data-label="Alias">Heidi</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Scrollable tables can be created by simply adding the <code>.scrollable</code> class to the root element of your table (i.e. the <code><table></code> element). Scrollable tables are flexible, so they can accommodate any amount of data rows and, if there is a lot of data, they will make their overflow scrollable. Remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors. Keep in mind, however, that <code>.horizontal</code> tables do not support the <code><tfoot></code> element.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><table class="scrollable">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Surname</th>
|
||||||
|
<th>Alias</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
<td data-label="Surname">Wilberts</td>
|
||||||
|
<td data-label="Alias">MrOne</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Adam</td>
|
||||||
|
<td data-label="Surname">Smith</td>
|
||||||
|
<td data-label="Alias">TheSmith</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Sophia</td>
|
||||||
|
<td data-label="Surname">Canderson</td>
|
||||||
|
<td data-label="Alias">Candee</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Due to <code>.scrollable</code> tables utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a>, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.</li>
|
||||||
|
<li>Mixing the Flexible Layout Module with <code><table></code> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with <code>.scrollable</code> tables, feel free to <a href="https://github.com/Chalarangelo/mini.css/issues/new">submit a new issue on Github</a>.</li>
|
||||||
|
<li><code>.scrollable</code> tables have a default maximum height of <code>400px</code>. If you want to change this, you should check out the <a href="customization">customization</a> page.</li>
|
||||||
|
</ul>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><table class="scrollable">
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
<tfoot>
|
||||||
|
<span class="fore-secondary"><!-- Do not do this! --></span>
|
||||||
|
</tfoot>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</table></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> We already explicitly stated that, due to the way <code>.scrollable</code> tables are styled, the <code><tfoot></code> element is not supported. Please refer to the last section of this page if you need to use this element and you want to have a scrollable table layout.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="horizontal-tables">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Horizontal tables</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br><table class="horizontal preset">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Scrollable tables are very similar to horizontal ones and can be created by simply adding the <code>.scrollable</code> class to the root element of your table (i.e. the <code><table></code> element). Similarly to horizontal ones, they can accommodate as many data rows as you like, making their overflow scrollable, while they do not support the <code><tfoot></code> element. As usual, remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><table class="horizontal">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Surname</th>
|
||||||
|
<th>Alias</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
<td data-label="Surname">Wilberts</td>
|
||||||
|
<td data-label="Alias">MrOne</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Adam</td>
|
||||||
|
<td data-label="Surname">Smith</td>
|
||||||
|
<td data-label="Alias">TheSmith</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Sophia</td>
|
||||||
|
<td data-label="Surname">Canderson</td>
|
||||||
|
<td data-label="Alias">Candee</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Due to <code>.horizontal</code> tables utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a>, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.</li>
|
||||||
|
<li>Mixing the Flexible Layout Module with <code><table></code> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with <code>.horizontal</code> tables, feel free to <a href="https://github.com/Chalarangelo/mini.css/issues/new">submit a new issue on Github</a>.</li>
|
||||||
|
</ul>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><table class="horizontal scrollable">
|
||||||
|
<span class="fore-secondary"><!-- Bad table --></span>
|
||||||
|
<thead>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid comibing the <code>.horizontal</code> and <code>.scrollable</code> classes on the same element, as this can cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="variants-matrices">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Table variants & matrices</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<table class="preset">
|
||||||
|
<caption>Star Wars Character Alignment Table</caption>
|
||||||
|
<tbody>
|
||||||
|
<tr class="border-fix"><th></th><th>Lawful</th><th>Neutral</th><th>Chaotic</th></tr>
|
||||||
|
<tr><th>Good</th><td>Yoda</td><td>Luke Skywalker</td><td>Chewbacca</td></tr>
|
||||||
|
<tr><th>Neutral</th><td>C-3PO</td><td>Boba Fett</td><td>Han Solo</td></tr>
|
||||||
|
<tr><th>Bad</th><td>Darth Vader</td><td>Emperor Palpatine</td><td>Jabba the Hutt</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Tables are responsive by default, however you can disable this functionality for one or more tables (normal or <code>.horizontal</code>), using the <code>.preset</code> class. This class can also be used for a multitude of things, like dealing with tables not allowing you to have <code><th></code> elements inside the <code><tbody></code> element, building matrices (i.e. tables with a header column and a header row) etc. Finally, you can make your tables use a different color for every other row, using the <code>.striped</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<p>The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. By the way, we present a sample for a matrix table in he first example, but you can use the same principles and classes to create any table layout you wish.</p><br>
|
||||||
|
<div class="container"><div class="row"><div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="grid-base-sample">
|
||||||
|
<label for="grid-base-sample">Show sample code</label>
|
||||||
|
<div>
|
||||||
|
<pre><table class="preset">
|
||||||
|
<caption>Star Wars Character Alignment Table</caption>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Lawful</td>
|
||||||
|
<th>Neutral</td>
|
||||||
|
<th>Chaotic</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Good</th>
|
||||||
|
<td>Yoda</td>
|
||||||
|
<td>Luke Skywalker</td>
|
||||||
|
<td>Chewbacca</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Neutral</th>
|
||||||
|
<td>C-3PO</td>
|
||||||
|
<td>Boba Fett</td>
|
||||||
|
<td>Han Solo</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Bad</th>
|
||||||
|
<td>Darth Vader</td>
|
||||||
|
<td>Emperor Palpatine</td>
|
||||||
|
<td>Jabba the Hutt</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table class="striped">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<span class="fore-primary"><!-- ... --></span>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<span class="fore-primary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
</table></pre></div></div></div></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Making a table <code>.striped</code> also affects the color of the cards in their responsive view on mobile devices.</li>
|
||||||
|
<li>If you create a <code>.preset</code> table, which you do not want to alter via Javascript to be responsive at any time in the future, you can omit the <code>data-label</code> attributes.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><style>
|
||||||
|
.border-fix > td, .border-fix > th {
|
||||||
|
border-top: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<table class="preset">
|
||||||
|
<tbody>
|
||||||
|
<tr class="border-fix">
|
||||||
|
<span class="fore-tertiary"><!-- ... --></span>
|
||||||
|
</tr>
|
||||||
|
<span class="fore-tertiary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> The first row in a preset matrix table or any table without a <code><thead></code> element will have an extra border at the top. You can use a generic class to set <code>border-top: 0;</code> for the elements inside that row to fix this.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><table class="horizontal preset">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<table class="horizontal striped">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<table class="preset striped">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<table class="preset horizontal striped">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can combine any two of the following classes without any problems: <code>.horizontal</code>, <code>.preset</code>, <code>.striped</code>. Just make sure you respect each one's specific rules.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
522
docs/v2/table.html~gluon.v3
Normal file
522
docs/v2/table.html~gluon.v3
Normal file
|
@ -0,0 +1,522 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Table</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, table ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #c9c9c9;}
|
||||||
|
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored {color: #f5f5f5; } @media (max-width: 767px){.container#co {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
table#carded { border-collapse: collapse;border: 0;width: 100%; box-shadow: none; }
|
||||||
|
table#carded thead, table#carded th { border: 0;height: 1px;width: 1px; margin: -1px; overflow: hidden; padding: 0;position: absolute;clip: rect(0 0 0 0); -webkit-clip-path: inset(100%); clip-path: inset(100%); }
|
||||||
|
table#carded tr {display: block;border: 1px solid #c9c9c9;box-shadow: none;background: #fafafa; margin-bottom: 0.625rem; }
|
||||||
|
table#carded td {display: block;border: 0; border-bottom: 1px solid #c9c9c9; text-align: right; }
|
||||||
|
table#carded td:before { content: attr(data-label); float: left; font-weight: 700; }
|
||||||
|
table#carded td:last-child { border-bottom: 0; } .border-fix > td, .border-fix > th { border-top: 0; }.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #c9c9c9;} @media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #c9c9c9;}}
|
||||||
|
@media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="table-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Table</h1>
|
||||||
|
<p style="text-align: justify;">The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.</p>
|
||||||
|
<p style="text-align: justify;"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align: justify;">Presenting information the right way is very important, especially so when dealing with large amounts of data. The <strong>table</strong> module reinvents tabular data presentation, using modern styling and responsiveness to help make tables fun again for all users no matter the device size. Tables can be either vertical or horizontal, both collapsing to a card view on smaller devices, so that they are easier to view properly. Horizontal tables are also flexible, allowing you to take as little space as possible, while still providing your users with a pleasant way to view their data. Finally, like in most CSS frameworks nowadays, you can stripe your tables to make reading them slightly less tiresome for your users' eyes. Note that all of the table variants are fully accessible.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align: justify;">To use the <strong>table</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="syntax-responsiveness">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Basic syntax & responsiveness</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<h4>Medium/Large screen layout</h4><hr>
|
||||||
|
<table class="preset">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<h4>Small screen layout</h4><hr>
|
||||||
|
<table id="carded">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Table layout utilizes the <code><table></code> HTML element with the following structure (usual tabular structure):</p>
|
||||||
|
<ol style="text-align: justify;">
|
||||||
|
<li>On the outermost level, there is the <code><table></code> element.</li>
|
||||||
|
<li>If you want to include a <code><caption></code> element, it must by the first element inside the <code><table></code> element.</li>
|
||||||
|
<li>Following the above, you need to add a <code><thead></code> element. Inside it, you should usually add one <code><tr></code> element, which contains one or more <code><th></code> elements.</li>
|
||||||
|
<li>Immediately after the <code><thead></code> element, you can add a <code><tfoot></code> element, if you want to. Inside it, you should usually add one or more <code><tr></code> elements, which contain one or more <code><td></code> elements. </li>
|
||||||
|
<li>Finally, add your <code><tbody></code> element. Inside it, you should usually add one or more <code><tr></code> elements, which contain one or more <code><td></code> elements. For each <code><td></code> element, specify a <code>data-label</code> attribute equal to the heading of the column. This enables responsibility for your table, so that the values in the columns will be properly labeled on mobile devices.</li>
|
||||||
|
</ol>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><table>
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Surname</th>
|
||||||
|
<th>Alias</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
<td data-label="Surname">Wilberts</td>
|
||||||
|
<td data-label="Alias">MrOne</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Adam</td>
|
||||||
|
<td data-label="Surname">Smith</td>
|
||||||
|
<td data-label="Alias">TheSmith</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Sophia</td>
|
||||||
|
<td data-label="Surname">Canderson</td>
|
||||||
|
<td data-label="Alias">Candee</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Tables are responsive by default and will change to a card-like view below a certain screen width. If you'd rather not make them responsive, check the last section on this page.</li>
|
||||||
|
<li>Specifying the <code>data-label</code> attribute is essential for the responsive version of a table to display properly. You can, however, use a value different from the column's name. Make sure it does not confuse your users, though.</li>
|
||||||
|
<li>We strongly suggest you avoid adding multiple rows in your <code><thead></code> element, as it could cause problems with accessibility. However, if you absolutely must, you might want to check <a href="http://codepen.io/chalarangelo/pen/VPqWQE">this codepen</a> for an idea on how to deal with irregular border styling.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><tr>
|
||||||
|
<td>Chad</td>
|
||||||
|
<td>Wilberts</td>
|
||||||
|
<td>MrOne</td>
|
||||||
|
</tr></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Remember to always add a <code>data-label</code> attribute to your <code><td></code> elements, as the table's card view is very dependent on them to display properly. <code><th></code> elements, however, do not require or utilize this attribute.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><table>
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</tfoot>
|
||||||
|
</table></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> The <code><tfoot></code> element must always be immediately after the <code><thead></code> element, if included.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
</tr>
|
||||||
|
</tbody></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid inserting <code><th></code> elements inside your <code><tbody></code> element. If you want to make your tables horizontal or preset their styling in a manner different from the one shown in the previous examples, check the below sections.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><thead>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
</tr>
|
||||||
|
</thead></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid using <code><td></code> elements inside your <code><thead></code>. You should use a <code><tbody></code> element instead.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="scrollable-tables">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Scrollable tables</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br><table class="scrollable preset">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
|
||||||
|
<tr><td data-label="Name">Mark</td><td data-label="Surname">Gerkis</td><td data-label="Alias">Markie</td></tr>
|
||||||
|
<tr><td data-label="Name">John</td><td data-label="Surname">Fergusson</td><td data-label="Alias">Fergujohn</td></tr>
|
||||||
|
<tr><td data-label="Name">Sylvia</td><td data-label="Surname">Pouleau</td><td data-label="Alias">Sylver</td></tr>
|
||||||
|
<tr><td data-label="Name">Norman</td><td data-label="Surname">Jones</td><td data-label="Alias">NormalJones</td></tr>
|
||||||
|
<tr><td data-label="Name">Trevor</td><td data-label="Surname">Heidel</td><td data-label="Alias">Heidi</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Scrollable tables can be created by simply adding the <code>.scrollable</code> class to the root element of your table (i.e. the <code><table></code> element). Scrollable tables are flexible, so they can accommodate any amount of data rows and, if there is a lot of data, they will make their overflow scrollable. Remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors. Keep in mind, however, that <code>.horizontal</code> tables do not support the <code><tfoot></code> element.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><table class="scrollable">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Surname</th>
|
||||||
|
<th>Alias</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
<td data-label="Surname">Wilberts</td>
|
||||||
|
<td data-label="Alias">MrOne</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Adam</td>
|
||||||
|
<td data-label="Surname">Smith</td>
|
||||||
|
<td data-label="Alias">TheSmith</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Sophia</td>
|
||||||
|
<td data-label="Surname">Canderson</td>
|
||||||
|
<td data-label="Alias">Candee</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Due to <code>.scrollable</code> tables utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a>, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.</li>
|
||||||
|
<li>Mixing the Flexible Layout Module with <code><table></code> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with <code>.scrollable</code> tables, feel free to <a href="https://github.com/Chalarangelo/mini.css/issues/new">submit a new issue on Github</a>.</li>
|
||||||
|
<li><code>.scrollable</code> tables have a default maximum height of <code>400px</code>. If you want to change this, you should check out the <a href="customization">customization</a> page.</li>
|
||||||
|
</ul>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><table class="scrollable">
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
<tfoot>
|
||||||
|
<span class="fore-secondary"><!-- Do not do this! --></span>
|
||||||
|
</tfoot>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</table></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> We already explicitly stated that, due to the way <code>.scrollable</code> tables are styled, the <code><tfoot></code> element is not supported. Please refer to the last section of this page if you need to use this element and you want to have a scrollable table layout.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="horizontal-tables">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Horizontal tables</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br><table class="horizontal preset">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
|
||||||
|
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
|
||||||
|
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
|
||||||
|
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Scrollable tables are very similar to horizontal ones and can be created by simply adding the <code>.scrollable</code> class to the root element of your table (i.e. the <code><table></code> element). Similarly to horizontal ones, they can accommodate as many data rows as you like, making their overflow scrollable, while they do not support the <code><tfoot></code> element. As usual, remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><table class="horizontal">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Surname</th>
|
||||||
|
<th>Alias</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Chad</td>
|
||||||
|
<td data-label="Surname">Wilberts</td>
|
||||||
|
<td data-label="Alias">MrOne</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Adam</td>
|
||||||
|
<td data-label="Surname">Smith</td>
|
||||||
|
<td data-label="Alias">TheSmith</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-label="Name">Sophia</td>
|
||||||
|
<td data-label="Surname">Canderson</td>
|
||||||
|
<td data-label="Alias">Candee</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Due to <code>.horizontal</code> tables utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a>, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.</li>
|
||||||
|
<li>Mixing the Flexible Layout Module with <code><table></code> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with <code>.horizontal</code> tables, feel free to <a href="https://github.com/Chalarangelo/mini.css/issues/new">submit a new issue on Github</a>.</li>
|
||||||
|
</ul>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><table class="horizontal scrollable">
|
||||||
|
<span class="fore-secondary"><!-- Bad table --></span>
|
||||||
|
<thead>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<span class="fore-secondary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
<p class="dont" style="text-align: justify;"><mark class="secondary">Don't:</mark> Avoid comibing the <code>.horizontal</code> and <code>.scrollable</code> classes on the same element, as this can cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="variants-matrices">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Table variants & matrices</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<table class="preset">
|
||||||
|
<caption>Star Wars Character Alignment Table</caption>
|
||||||
|
<tbody>
|
||||||
|
<tr class="border-fix"><th></th><th>Lawful</th><th>Neutral</th><th>Chaotic</th></tr>
|
||||||
|
<tr><th>Good</th><td>Yoda</td><td>Luke Skywalker</td><td>Chewbacca</td></tr>
|
||||||
|
<tr><th>Neutral</th><td>C-3PO</td><td>Boba Fett</td><td>Han Solo</td></tr>
|
||||||
|
<tr><th>Bad</th><td>Darth Vader</td><td>Emperor Palpatine</td><td>Jabba the Hutt</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align: justify;">Tables are responsive by default, however you can disable this functionality for one or more tables (normal or <code>.horizontal</code>), using the <code>.preset</code> class. This class can also be used for a multitude of things, like dealing with tables not allowing you to have <code><th></code> elements inside the <code><tbody></code> element, building matrices (i.e. tables with a header column and a header row) etc. Finally, you can make your tables use a different color for every other row, using the <code>.striped</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<p>The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. By the way, we present a sample for a matrix table in he first example, but you can use the same principles and classes to create any table layout you wish.</p><br>
|
||||||
|
<div class="container"><div class="row"><div class="tabs stacked">
|
||||||
|
<input type="checkbox" id="grid-base-sample">
|
||||||
|
<label for="grid-base-sample">Show sample code</label>
|
||||||
|
<div>
|
||||||
|
<pre><table class="preset">
|
||||||
|
<caption>Star Wars Character Alignment Table</caption>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Lawful</td>
|
||||||
|
<th>Neutral</td>
|
||||||
|
<th>Chaotic</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Good</th>
|
||||||
|
<td>Yoda</td>
|
||||||
|
<td>Luke Skywalker</td>
|
||||||
|
<td>Chewbacca</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Neutral</th>
|
||||||
|
<td>C-3PO</td>
|
||||||
|
<td>Boba Fett</td>
|
||||||
|
<td>Han Solo</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Bad</th>
|
||||||
|
<td>Darth Vader</td>
|
||||||
|
<td>Emperor Palpatine</td>
|
||||||
|
<td>Jabba the Hutt</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table class="striped">
|
||||||
|
<caption>People</caption>
|
||||||
|
<thead>
|
||||||
|
<span class="fore-primary"><!-- ... --></span>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<span class="fore-primary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
</table></pre></div></div></div></div><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align: justify;">
|
||||||
|
<li>Making a table <code>.striped</code> also affects the color of the cards in their responsive view on mobile devices.</li>
|
||||||
|
<li>If you create a <code>.preset</code> table, which you do not want to alter via Javascript to be responsive at any time in the future, you can omit the <code>data-label</code> attributes.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><style>
|
||||||
|
.border-fix > td, .border-fix > th {
|
||||||
|
border-top: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<table class="preset">
|
||||||
|
<tbody>
|
||||||
|
<tr class="border-fix">
|
||||||
|
<span class="fore-tertiary"><!-- ... --></span>
|
||||||
|
</tr>
|
||||||
|
<span class="fore-tertiary"><!-- ... --></span>
|
||||||
|
</tbody>
|
||||||
|
</table></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> The first row in a preset matrix table or any table without a <code><thead></code> element will have an extra border at the top. You can use a generic class to set <code>border-top: 0;</code> for the elements inside that row to fix this.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><table class="horizontal preset">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<table class="horizontal striped">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<table class="preset striped">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<table class="preset horizontal striped">
|
||||||
|
<span class="fore-tertiary"><!-- ... -></span>
|
||||||
|
</table></pre>
|
||||||
|
<p class="do" style="text-align: justify;"><mark class="tertiary">Do:</mark> You can combine any two of the following classes without any problems: <code>.horizontal</code>, <code>.preset</code>, <code>.striped</code>. Just make sure you respect each one's specific rules.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align: justify;">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
95
docs/v2/templates.html~HEAD
Normal file
95
docs/v2/templates.html~HEAD
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
|
||||||
|
<title>mini.css - Templates</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, template, templates ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
|
||||||
|
.box-colored.red { background: #e53935; } .box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
h2 > a{ font-size: 1rem; float: right;} .box-left { text-align: left; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm.col-lg-offset.col-lg-10{padding: 0 !important;}}
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a> <label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<input type="checkbox" id="navigation-toggle"> <nav class="drawer hidden-md hidden-lg">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a> <a href="modules"><h4 style="margin-left: 0;">Modules</h4></a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a> <a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a> <a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<!-- Insert your page content here-->
|
||||||
|
<main><div class="container">
|
||||||
|
<div class="row" style="padding-top: 40px;">
|
||||||
|
<div class="col-sm col-lg-10 col-lg-offset-1">
|
||||||
|
<h1>Templates</h1>
|
||||||
|
<p style="text-align: justify;">Getting started with <strong>mini.css</strong> is reasonably easy, however sometimes you need a couple of examples or templates to figure out the optimal way to design your website or app. To help you get started, we maintain a handful of templates that can help you quickstart your projects without having to read the full documentation.</p><br/>
|
||||||
|
<ul style="margin-left:0px; padding-left: 4px">
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<a href="https://codepen.io/chalarangelo/project/editor/DzvxKa/" class="section media" style="height:480px; -o-object-fit: scale-down; object-fit:scale-down; text-align: center;"><img src="project_thumbnail.png" style="height:480px; -o-object-fit: scale-down; object-fit:scale-down;"></a>
|
||||||
|
<h2 class="section double-padded">Full website template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">A complete sample website created using the grid system of <strong>mini.css</strong>, cards, navigational elements and input controls. The website consists of three pages, each showcasing different modules and patterns. The homepage and blog post showcase the typography styling and emphasize the importance of the grid system and the card module, while the contact form showcases the forms, buttons and other input controls. The sample website is fully responsive, changing layout based on screen size, while all of the code is carefully documented, implementing certain patterns and tricks that can be very useful when designing a website.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="WpPqaj" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Single Column Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/WpPqaj/">Single Column Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Single column template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">The most basic layout template for a blog or website consists of a sticky header, one column used to display content and a footer at the bottom of the page. This template uses the grid system of <strong>mini.css</strong>, along with its navigational elements to provide a simple responsive website design, that you can use to display content across devices without the need for any changes in the layout.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="Vbeeqj" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Two Column Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/Vbeeqj/">Two Column Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Two-column template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Another common layout template for blogs and websites consists of a sticky header, a footer and two columns for displaying content. Like in most templates, the grid system of <strong>mini.css</strong> is used to provide an easy way to create columns and make them responsive across multiple screen sizes and devices.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="OmMNoa" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Three Column Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/OmMNoa/">Three Column Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Three-column template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Last but not least, the three-column website layout template is better used in websites with a lot of content. The grid system of <strong>mini.css</strong> provides an easy solution to handling lots of content on multiple screen sizes and devices, making the content responsive. Finally, as in most templates, navigational elements such as sticky headers and foooters are used to complete the template.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="xdZOVP" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Card Showcase Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/xdZOVP/">Card Showcase Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Card showcase template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Card-based website layout templates are another common need, as many websites utilize a tile system to display lots of smaller pieces of content. Using the card and grid modules of <strong>mini.css</strong>, along with a couple of navigational elements, it's really easy to create a responsive website with lots of cards containing small pieces of content, such as a showcase for a website, a photo album or an article browser.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="GmWrVv" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Login Form Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/GmWrVv/">Login Form Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Login form template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Login forms are one of the most commonly used elements in any website design. Using the input_control and grid modules of <strong>mini.css</strong>, along with a couple of navigational elements and a couple of optional tricks, it's really easy to create a responsive login form with the required fields and buttons.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="EmPyBe" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Android App Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/EmPyBe/">Android App Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Android app template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Web application layout templates are pretty popular these days, especially ones that look and feel like native Android apps. Utilizing some clever CSS tricks, the grid module and navigational elements from <strong>mini.css</strong>, we created a pretty simple app template, complete with a call-to-action button and header bar, making it look quite similar to a native Android app and display properly across multiple devices.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="JNGREq" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Tabbed App Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/JNGREq/">Tabbed App Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Tabbed app template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">A single page application layout template can be built using many things, but tabbed web applications are one of our favorites. Utilizing the tab module of <strong>mini.css</strong> and some CSS tricks, we created a simple single page app template with three tabs, containing different content. The template will switch to a stacked view on smaller devices, although if you add more than three tabs, you will have to alter a couple of values to make sure that everything fits nicely on the screen.</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></main>
|
||||||
|
<!-- End of page content-->
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
95
docs/v2/templates.html~gluon.v3
Normal file
95
docs/v2/templates.html~gluon.v3
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
|
||||||
|
<title>mini.css - Templates</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, template, templates ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
|
||||||
|
.box-colored.red { background: #e53935; } .box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
|
||||||
|
h2 > a{ font-size: 1rem; float: right;} .box-left { text-align: left; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm.col-lg-offset.col-lg-10{padding: 0 !important;}}
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a> <label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<input type="checkbox" id="navigation-toggle"> <nav class="drawer hidden-md hidden-lg">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a> <a href="modules"><h4 style="margin-left: 0;">Modules</h4></a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a> <a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a> <a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<!-- Insert your page content here-->
|
||||||
|
<main><div class="container">
|
||||||
|
<div class="row" style="padding-top: 40px;">
|
||||||
|
<div class="col-sm col-lg-10 col-lg-offset-1">
|
||||||
|
<h1>Templates</h1>
|
||||||
|
<p style="text-align: justify;">Getting started with <strong>mini.css</strong> is reasonably easy, however sometimes you need a couple of examples or templates to figure out the optimal way to design your website or app. To help you get started, we maintain a handful of templates that can help you quickstart your projects without having to read the full documentation.</p><br/>
|
||||||
|
<ul style="margin-left:0px; padding-left: 4px">
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<a href="https://codepen.io/chalarangelo/project/editor/DzvxKa/" class="section media" style="height:480px; -o-object-fit: scale-down; object-fit:scale-down; text-align: center;"><img src="project_thumbnail.png" style="height:480px; -o-object-fit: scale-down; object-fit:scale-down;"></a>
|
||||||
|
<h2 class="section double-padded">Full website template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">A complete sample website created using the grid system of <strong>mini.css</strong>, cards, navigational elements and input controls. The website consists of three pages, each showcasing different modules and patterns. The homepage and blog post showcase the typography styling and emphasize the importance of the grid system and the card module, while the contact form showcases the forms, buttons and other input controls. The sample website is fully responsive, changing layout based on screen size, while all of the code is carefully documented, implementing certain patterns and tricks that can be very useful when designing a website.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="WpPqaj" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Single Column Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/WpPqaj/">Single Column Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Single column template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">The most basic layout template for a blog or website consists of a sticky header, one column used to display content and a footer at the bottom of the page. This template uses the grid system of <strong>mini.css</strong>, along with its navigational elements to provide a simple responsive website design, that you can use to display content across devices without the need for any changes in the layout.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="Vbeeqj" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Two Column Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/Vbeeqj/">Two Column Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Two-column template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Another common layout template for blogs and websites consists of a sticky header, a footer and two columns for displaying content. Like in most templates, the grid system of <strong>mini.css</strong> is used to provide an easy way to create columns and make them responsive across multiple screen sizes and devices.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="OmMNoa" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Three Column Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/OmMNoa/">Three Column Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Three-column template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Last but not least, the three-column website layout template is better used in websites with a lot of content. The grid system of <strong>mini.css</strong> provides an easy solution to handling lots of content on multiple screen sizes and devices, making the content responsive. Finally, as in most templates, navigational elements such as sticky headers and foooters are used to complete the template.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="xdZOVP" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Card Showcase Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/xdZOVP/">Card Showcase Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Card showcase template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Card-based website layout templates are another common need, as many websites utilize a tile system to display lots of smaller pieces of content. Using the card and grid modules of <strong>mini.css</strong>, along with a couple of navigational elements, it's really easy to create a responsive website with lots of cards containing small pieces of content, such as a showcase for a website, a photo album or an article browser.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="GmWrVv" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Login Form Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/GmWrVv/">Login Form Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Login form template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Login forms are one of the most commonly used elements in any website design. Using the input_control and grid modules of <strong>mini.css</strong>, along with a couple of navigational elements and a couple of optional tricks, it's really easy to create a responsive login form with the required fields and buttons.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="EmPyBe" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Android App Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/EmPyBe/">Android App Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Android app template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">Web application layout templates are pretty popular these days, especially ones that look and feel like native Android apps. Utilizing some clever CSS tricks, the grid module and navigational elements from <strong>mini.css</strong>, we created a pretty simple app template, complete with a call-to-action button and header bar, making it look quite similar to a native Android app and display properly across multiple devices.</p>
|
||||||
|
</li>
|
||||||
|
<li class="card fluid" style="margin-bottom: 3rem;">
|
||||||
|
<p data-height="480" data-theme-id="0" data-slug-hash="JNGREq" data-default-tab="result" data-user="chalarangelo" data-embed-version="2" data-pen-title="Tabbed App Template (mini.css)" data-preview="true" class="codepen section">See the Pen <a href="http://codepen.io/chalarangelo/pen/JNGREq/">Tabbed App Template (mini.css)</a> by Angelos Chalaris (<a href="http://codepen.io/chalarangelo">@chalarangelo</a>) on <a href="http://codepen.io">CodePen</a>.</p>
|
||||||
|
<h2 class="section double-padded">Tabbed app template</h2>
|
||||||
|
<p class="section double-padded" style="text-align: justify;">A single page application layout template can be built using many things, but tabbed web applications are one of our favorites. Utilizing the tab module of <strong>mini.css</strong> and some CSS tricks, we created a simple single page app template with three tabs, containing different content. The template will switch to a stacked view on smaller devices, although if you add more than three tabs, you will have to alter a couple of values to make sure that everything fits nicely on the screen.</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></main>
|
||||||
|
<!-- End of page content-->
|
||||||
|
<footer style="text-align: justify;"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
350
docs/v2/utility.html~HEAD
Normal file
350
docs/v2/utility.html~HEAD
Normal file
|
@ -0,0 +1,350 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Utility</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, utility, helper, classes, utilities ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #b71c1c; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.col-sm-12.col-sm-last.col-md-12.col-md-normal { box-sizing: border-box; border-bottom: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-12.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #1b5e20; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored { color: #f5f5f5;} @media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="utility-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Utility</h1>
|
||||||
|
<p style="text-align:justify">The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Every website or app has different needs and no CSS framework can predict them all. The <strong>utility</strong> module addresses this issue by providing you with a handful of utility and helper classes to make common, repetitive declarations easier. These classes include, but are not limited to, generic border styling and shadows, some responsive sizing and spacing utilities and a few other things, like a close icon, breadcrumbs styling and visiblity helpers for screen readers.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>utility</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="visibility-helpers">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Visibility helpers</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-first">
|
||||||
|
<p style="text-align:justify">You can hide content for all your users, using the default <code><span class="fore-secondary">hidden</span></code> attribute. However, we provide you with the <code>.hidden</code> class for the same purpose, as well as the <code>.visually-hidden</code> class which will make your content hidden, except for screen readers.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="hidden">Hidden text</span>
|
||||||
|
<span class="visually-hidden">Screen-reader-only text</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><span class="hidden visually-hidden">Not a good idea</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid using both classes at the same time. Instead, use <code>.hidden</code> to hide content for all users, <code>.visually-hidden</code> to hide it for non-screen-reader users or <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> to hide it for screen-reader-only users.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="borders-shadows">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Generic borders & shadows</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br>
|
||||||
|
<p>This is a paragraph with a piece of <span class="bordered">bordered text</span>.</p>
|
||||||
|
<button class="bordered">Bordered button</button><button class="bordered primary">Bordered button</button><br>
|
||||||
|
<p><img src="https://placehold.it/200x200?text=rounded" class="rounded" alt="image"> <img src="https://placehold.it/200x200?text=circular" class="circular" alt="image"></p><br>
|
||||||
|
<p><span class="shadowed">This is an element that casts a shadow.</span></p><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Use the <code>.bordered</code> class to apply a generic black border with 25% opacity to any element. Apart from that you can use the <code>.rounded</code> and <code>.circular</code> classes to create generic border radiuses. Finally, you can use the <code>.shadowed</code> class to add a generic <code><span class="fore-secondary">box-shadow</span></code> to any element.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="bordered">Bordered</span>
|
||||||
|
<span class="rounded">Rounded</span>
|
||||||
|
<span class="circular">Circular</span>
|
||||||
|
<span class="shadowed">Casts shadow</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>All of these classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
<li>The <code>.bordered</code> class was originally created with elements such as buttons in mind, to allow users highlighting certain elements in their designs, without having to change any default styles.</li>
|
||||||
|
<li>All of the above classes can be used with most modern HTML elements.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><span class="bordered rounded shadow-small">Stylized element</span></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can combine a generic border with any border radius or shadow or even both.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><span class="rounded circular">Bad radius</span>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<span class="shadow-small shadow-large">Bad shadow</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining two classes of the same type (i.e. two radii or two shadow styles), as they might overwrite each other and cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="responsive-sizing">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Responsive sizing & spacing classes</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-first">
|
||||||
|
<p style="text-align:justify">Helper classes for the <code>padding</code> and <code>margin</code> attributes are provided in the form of <code>.responsive-margin</code> and <code>.responsive-padding</code> classes. Both of these classes are responsive, allowing you to collapse the spacing and size of elements on different displays to make better use of the device's viewport.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="responsive-padding">Responsive padding</div>
|
||||||
|
<div class="responsive-margin">Responsive margin</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>If the default values of these classes are not suited to your needs, check out the <a href="customization">customization</a> page.</li>
|
||||||
|
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="responsive-padding responsive-margin">Responsive padding and margin</div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can use both of these classes to make certain element adapt to changes. This could be especially useful for certain grid layouts.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="responsive-visibility">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Responsive visibility helpers</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-first">
|
||||||
|
<p style="text-align:justify">You can hide content (either fully or only visually) for certain screens, using the responsive visibility helpers. To hide elements completely use the <code>.hidden-<span class="fore-primary">SCR_SZ</span></code> syntax, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens). If you want to hide certains elements for all users, except screen readers, replace <code>.hidden</code> with <code>.visually-hidden</code>, followed by the screen size name.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="hidden-sm">Hidden in smaller screens</span>
|
||||||
|
<span class="hidden-md">Hidden in medium-sized screens</span>
|
||||||
|
<span class="hidden-lg">Hidden in larger screens</span>
|
||||||
|
|
||||||
|
<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
|
||||||
|
<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
|
||||||
|
<span class="visually-hidden-lg">Visually hidden in larger screens</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Responsive visibility helper classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
<li>The specific breakpoints for small, medium and large screen sizes are as follows:
|
||||||
|
<ul>
|
||||||
|
<li><strong>small</strong>: less than <code>768px</code> wide</li>
|
||||||
|
<li><strong>medium</strong>: more than or equal to <code>768px</code> wide but less than <code>1280px</code> wide</li>
|
||||||
|
<li><strong>large</strong>: <code>1280px</code> wide or more</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Responsive visibility helper classes are independent, meaning that hiding an element in one screen size will not affect it visibility in any other screen size.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><span class="hidden-sm hidden-md">Hidden in smaller and medium-sized screens, visible in larger screens</span>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<span class="visually-hidden-md visually-hidden-lg">Visually hidden in medium-sized and larger screens, visible in smaller screens</span>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<span class="hidden-sm visually-hidden-lg">Hidden in smaller screens, visually hidden in larger screens, visible in medium-sized screens</span></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can combine responsive visibility helpers for different sizes, based on your needs.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><span class="hidden-sm visually-hidden-sm">Not a good idea</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining responsive visibility helpers for the same screen size. Combining both of them might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="breadcrumbs">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Breadcrumbs</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<ul class="breadcrumbs"> <li><a href="#">Root</a></li> <li><a href="#">Folder</a></li> <li>File</li> </ul><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align:justify">Breadcrumbs are usually used to show the navigational hierarchy of pages or folders. To use them, simply create a <code><ul></code> element that implements the <code>.breadcrumbs</code> class. Inside this unordered list, add as many <code><li></code> elements as needed to show your hierarchy. You can add links to the list elements, as necessary.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><ul class="breadcrumbs">
|
||||||
|
<li><a href="#">Root</a></li>
|
||||||
|
<li><a href="#">Folder</a></li>
|
||||||
|
<li>File</li>
|
||||||
|
</ul></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>The separators between breadcrumbs are added using some tricky CSS rules. Due to that, there might be a few browser versions or devices where you can see part of the seams between the element separators.</li>
|
||||||
|
<li>Breadcrumbs show a hierarchy, an ordered list. However, we do not use the <code><ol></code> element, as it might conflict with some custom styles we've seen people use.</li>
|
||||||
|
<li>If you want to add some accesibility to your breadcrumbs, you can add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://www.w3.org/TR/wai-aria/roles#navigation">navigation</a>"</span></code> attribute, although it is not required.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><ol class="breadcrumbs">
|
||||||
|
<li><a href="#">Does</a></li>
|
||||||
|
<li><a href="#">Not</a></li>
|
||||||
|
<li>Work</li>
|
||||||
|
</ol></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> The structure of the breadcrumb component prohibits the use of <code><ol></code> in place of the <code><ul></code> element.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><ul class="breadcrumbs">
|
||||||
|
<li><a href="#">Root</a>
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li><a href="#">Folder</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>File</li>
|
||||||
|
</ul></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid nesting lists, breadcrumbs or a combination of the two inside the <code>.breadcrumbs</code> list, as this might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="close-icon">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Close icon</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br>
|
||||||
|
<p style="text-align:center;"> <span class="close"></span> </p>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">To create a close icon, simply add an element implementing the <code>.close</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="close"></span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>The close icon behaves similar to a button when hovering over it or otherwise focusing or selecting it.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="close"></div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can use a handful of other HTML elements instead of the <code><span></code> element showcased in the example above, most commonly <code><div></code> elements.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><button class="close"></button></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> If you want your close icon to behave like a button (i.e. register as a button on screen readers and have the required logic attached to it), you can apply the <code>.close</code> class to a <code><button></code> element instead. You can even apply any of the button color variant classes.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
350
docs/v2/utility.html~gluon.v3
Normal file
350
docs/v2/utility.html~gluon.v3
Normal file
|
@ -0,0 +1,350 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="mini-default.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<title>mini.css - Utility</title>
|
||||||
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
|
||||||
|
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, utility, helper, classes, utilities ">
|
||||||
|
<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">
|
||||||
|
<style>
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/erE3KsIWUumgD1j_Ca-V-xJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
|
||||||
|
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; src: local('Noto Sans'), local('NotoSans'), url(https://fonts.gstatic.com/s/notosans/v6/LeFlHvsZjXu2c3ZRgBq9nFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
|
||||||
|
#header-logo { background: -webkit-linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); background: linear-gradient(#07020d 20%, #150627 45%, #220a40 70%, #300d5a); line-height:1; font-size: 39px; width: 48px; height: 48px; padding: 8px; margin-left: -9px; }
|
||||||
|
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #b71c1c; }
|
||||||
|
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } @media (max-width: 767px){.container {padding: 0.25rem !important;}.col-sm-12.col-md-8.col-lg-10{padding: 0 !important;}}
|
||||||
|
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
|
||||||
|
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.col-sm-12.col-sm-last.col-md-12.col-md-normal { box-sizing: border-box; border-bottom: 1px solid #c9c9c9; }
|
||||||
|
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-12.col-md-normal { border: 0; border-top: 1px solid #c9c9c9;}}
|
||||||
|
.box-colored.green { background: #1b5e20; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
|
||||||
|
.box-colored { color: #f5f5f5;} @media screen and (min-width: 768px) { .drawer { margin-top: 4px;}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="sticky">
|
||||||
|
<a href="index" class="logo"><span id="header-logo">m</span></a>
|
||||||
|
<label class="drawer-toggle button" for="navigation-toggle"></label>
|
||||||
|
<a href="index" class="button hidden-sm">Introduction</a> <a href="modules" class="button hidden-sm">Modules</a>
|
||||||
|
<a href="flavors" class="button hidden-sm">Flavors</a> <a href="templates" class="button hidden-sm">Templates</a>
|
||||||
|
<a href="customization" class="button hidden-sm">Customization</a> <a href="quick_reference" class="button hidden-sm">Quick Reference</a>
|
||||||
|
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.3em; position: relative; bottom: -2px; margin-right: 2px;"></i> Github</a>
|
||||||
|
</header>
|
||||||
|
<div class="container" style="padding-left: 0.25rem;">
|
||||||
|
<div class="row"> <input type="checkbox" id="navigation-toggle"> <nav class="drawer col-md-4 col-lg-2">
|
||||||
|
<label class="close" for="navigation-toggle"></label>
|
||||||
|
<a href="index"><h4 style="margin-left: 0;">Introduction</h4></a>
|
||||||
|
<h4 style="margin-left: 0;">Modules</h4> <a href="core#core-title">Core</a>
|
||||||
|
<a href="core#typography" class="sublink-1">Typography</a> <a href="core#headings" class="sublink-1">Headings</a>
|
||||||
|
<a href="core#common-textual-elements" class="sublink-1">Common textual elements</a>
|
||||||
|
<a href="core#lists" class="sublink-1">Lists</a> <a href="core#images-captions" class="sublink-1">Image responsiveness & captions</a>
|
||||||
|
<br/> <a href="grid#grid-title">Grid</a>
|
||||||
|
<a href="grid#basic-layout" class="sublink-1">Basic layout</a> <a href="grid#screen-specific-layout" class="sublink-1">Screen specific layouts</a>
|
||||||
|
<a href="grid#predefined-layout" class="sublink-1">Predefined layouts</a> <a href="grid#column-offset" class="sublink-1">Column offsets</a>
|
||||||
|
<a href="grid#column-reorder" class="sublink-1">Column reordering</a> <a href="grid#media-object" class="sublink-1">Media object pattern</a>
|
||||||
|
<br/> <a href="input_control#input-control-title">Input Control</a>
|
||||||
|
<a href="input_control#forms-input" class="sublink-1">Forms & input</a> <a href="input_control#checkbox-radio" class="sublink-1">Checkboxes & radio buttons</a> <a href="input_control#switches" class="sublink-1">Switches</a>
|
||||||
|
<a href="input_control#buttons" class="sublink-1">Buttons & button groups</a> <a href="input_control#file-upload" class="sublink-1">File upload buttons</a>
|
||||||
|
<br/> <a href="navigation#navigation-title">Navigation</a>
|
||||||
|
<a href="navigation#header" class="sublink-1">Header</a> <a href="navigation#navigation-bar" class="sublink-1">Navigation bar</a> <a href="navigation#drawer" class="sublink-1">Drawer</a>
|
||||||
|
<a href="navigation#footer" class="sublink-1">Footer</a> <a href="navigation#sticky" class="sublink-1">Sticky headers & footers</a>
|
||||||
|
<br/> <a href="table#table-title">Table</a>
|
||||||
|
<a href="table#syntax-responsiveness" class="sublink-1">Basic syntax & responsiveness</a> <a href="table#scrollable-tables" class="sublink-1">Scrollable tables</a>
|
||||||
|
<a href="table#horizontal-tables" class="sublink-1">Horizontal tables</a> <a href="table#variants-matrices" class="sublink-1">Table variants & matrices</a>
|
||||||
|
<br/> <a href="card#card-title">Card</a>
|
||||||
|
<a href="card#basic-syntax" class="sublink-1">Basic syntax</a> <a href="card#sections-media" class="sublink-1">Sections & media</a>
|
||||||
|
<a href="card#sizing-fluidity" class="sublink-1">Card sizing & fluidity</a> <a href="card#color-variants" class="sublink-1">Card color variants</a>
|
||||||
|
<br/> <a href="tab#tab-title">Tab</a>
|
||||||
|
<a href="tab#basic-syntax" class="sublink-1">Basic syntax</a> <a href="tab#stacked-tabs" class="sublink-1">Stacked tabs</a>
|
||||||
|
<br/> <a href="contextual#contextual-title">Contextual</a>
|
||||||
|
<a href="contextual#text-highlighting" class="sublink-1">Text highlighting</a> <a href="contextual#toasts" class="sublink-1">Toasts</a>
|
||||||
|
<a href="contextual#tooltips" class="sublink-1">Tooltips</a> <a href="contextual#modals" class="sublink-1">Modals</a>
|
||||||
|
<br/> <a href="progress#progress-title">Progress</a>
|
||||||
|
<a href="progress#basic-progress-bar" class="sublink-1">Basic progress bar</a> <a href="progress#progress-variants" class="sublink-1">Progress bar variants</a>
|
||||||
|
<a href="progress#donut-spinner" class="sublink-1">Donut spinner</a> <a href="progress#spinner-variants" class="sublink-1">Donut spinner variants</a>
|
||||||
|
<br/> <a href="utility#utility-title">Utility</a>
|
||||||
|
<a href="utility#visibility-helpers" class="sublink-1">Visibility helpers</a> <a href="utility#borders-shadows" class="sublink-1">Generic borders & shadows</a>
|
||||||
|
<a href="utility#responsive-sizing" class="sublink-1">Responsive sizing & spacing classes</a>
|
||||||
|
<a href="utility#responsive-visibility" class="sublink-1">Responsive visibility helpers</a> <a href="utility#breadcrumbs" class="sublink-1">Breadcrumbs</a>
|
||||||
|
<a href="utility#close-icon" class="sublink-1">Close icon</a>
|
||||||
|
<a href="flavors"><h4 style="margin-left: 0;">Flavors</h4></a>
|
||||||
|
<a href="templates"><h4 style="margin-left: 0;">Templates</h4></a>
|
||||||
|
<a href="customization"><h4 style="margin-left: 0;">Customization</h4></a>
|
||||||
|
<a href="quick_reference"><h4 style="margin-left: 0;">Quick Reference</h4></a>
|
||||||
|
</nav>
|
||||||
|
<div class="col-sm-12 col-md-8 col-lg-10"><main>
|
||||||
|
<div class="row" style="padding-top: 40px;" id="utility-title">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h1>Utility</h1>
|
||||||
|
<p style="text-align:justify">The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.</p>
|
||||||
|
<p style="text-align:justify"><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick overview</h2>
|
||||||
|
<p style="text-align:justify">Every website or app has different needs and no CSS framework can predict them all. The <strong>utility</strong> module addresses this issue by providing you with a handful of utility and helper classes to make common, repetitive declarations easier. These classes include, but are not limited to, generic border styling and shadows, some responsive sizing and spacing utilities and a few other things, like a close icon, breadcrumbs styling and visiblity helpers for screen readers.</p><br>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h2>Quick start</h2>
|
||||||
|
<p style="text-align:justify">To use the <strong>utility</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p>
|
||||||
|
<pre><<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">"viewport"</span> <span class="fore-secondary">content</span>=<span class="fore-primary">"width=device-width, initial-scale=1"</span>></pre><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="visibility-helpers">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Visibility helpers</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-first">
|
||||||
|
<p style="text-align:justify">You can hide content for all your users, using the default <code><span class="fore-secondary">hidden</span></code> attribute. However, we provide you with the <code>.hidden</code> class for the same purpose, as well as the <code>.visually-hidden</code> class which will make your content hidden, except for screen readers.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="hidden">Hidden text</span>
|
||||||
|
<span class="visually-hidden">Screen-reader-only text</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><span class="hidden visually-hidden">Not a good idea</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid using both classes at the same time. Instead, use <code>.hidden</code> to hide content for all users, <code>.visually-hidden</code> to hide it for non-screen-reader users or <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">"true"</span></code> to hide it for screen-reader-only users.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="borders-shadows">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Generic borders & shadows</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br>
|
||||||
|
<p>This is a paragraph with a piece of <span class="bordered">bordered text</span>.</p>
|
||||||
|
<button class="bordered">Bordered button</button><button class="bordered primary">Bordered button</button><br>
|
||||||
|
<p><img src="https://placehold.it/200x200?text=rounded" class="rounded" alt="image"> <img src="https://placehold.it/200x200?text=circular" class="circular" alt="image"></p><br>
|
||||||
|
<p><span class="shadowed">This is an element that casts a shadow.</span></p><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">Use the <code>.bordered</code> class to apply a generic black border with 25% opacity to any element. Apart from that you can use the <code>.rounded</code> and <code>.circular</code> classes to create generic border radiuses. Finally, you can use the <code>.shadowed</code> class to add a generic <code><span class="fore-secondary">box-shadow</span></code> to any element.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="bordered">Bordered</span>
|
||||||
|
<span class="rounded">Rounded</span>
|
||||||
|
<span class="circular">Circular</span>
|
||||||
|
<span class="shadowed">Casts shadow</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>All of these classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
<li>The <code>.bordered</code> class was originally created with elements such as buttons in mind, to allow users highlighting certain elements in their designs, without having to change any default styles.</li>
|
||||||
|
<li>All of the above classes can be used with most modern HTML elements.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><span class="bordered rounded shadow-small">Stylized element</span></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can combine a generic border with any border radius or shadow or even both.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><span class="rounded circular">Bad radius</span>
|
||||||
|
<span class="fore-secondary"><!-- or --></span>
|
||||||
|
<span class="shadow-small shadow-large">Bad shadow</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining two classes of the same type (i.e. two radii or two shadow styles), as they might overwrite each other and cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="responsive-sizing">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Responsive sizing & spacing classes</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-first">
|
||||||
|
<p style="text-align:justify">Helper classes for the <code>padding</code> and <code>margin</code> attributes are provided in the form of <code>.responsive-margin</code> and <code>.responsive-padding</code> classes. Both of these classes are responsive, allowing you to collapse the spacing and size of elements on different displays to make better use of the device's viewport.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><div class="responsive-padding">Responsive padding</div>
|
||||||
|
<div class="responsive-margin">Responsive margin</div></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>If the default values of these classes are not suited to your needs, check out the <a href="customization">customization</a> page.</li>
|
||||||
|
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<pre><div class="responsive-padding responsive-margin">Responsive padding and margin</div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can use both of these classes to make certain element adapt to changes. This could be especially useful for certain grid layouts.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="responsive-visibility">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Responsive visibility helpers</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-first">
|
||||||
|
<p style="text-align:justify">You can hide content (either fully or only visually) for certain screens, using the responsive visibility helpers. To hide elements completely use the <code>.hidden-<span class="fore-primary">SCR_SZ</span></code> syntax, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens). If you want to hide certains elements for all users, except screen readers, replace <code>.hidden</code> with <code>.visually-hidden</code>, followed by the screen size name.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="hidden-sm">Hidden in smaller screens</span>
|
||||||
|
<span class="hidden-md">Hidden in medium-sized screens</span>
|
||||||
|
<span class="hidden-lg">Hidden in larger screens</span>
|
||||||
|
|
||||||
|
<span class="visually-hidden-sm">Visually hidden in smaller screens</span>
|
||||||
|
<span class="visually-hidden-md">Visually hidden in medium-sized screens</span>
|
||||||
|
<span class="visually-hidden-lg">Visually hidden in larger screens</span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>Responsive visibility helper classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
|
||||||
|
<li>The specific breakpoints for small, medium and large screen sizes are as follows:
|
||||||
|
<ul>
|
||||||
|
<li><strong>small</strong>: less than <code>768px</code> wide</li>
|
||||||
|
<li><strong>medium</strong>: more than or equal to <code>768px</code> wide but less than <code>1280px</code> wide</li>
|
||||||
|
<li><strong>large</strong>: <code>1280px</code> wide or more</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Responsive visibility helper classes are independent, meaning that hiding an element in one screen size will not affect it visibility in any other screen size.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><span class="hidden-sm hidden-md">Hidden in smaller and medium-sized screens, visible in larger screens</span>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<span class="visually-hidden-md visually-hidden-lg">Visually hidden in medium-sized and larger screens, visible in smaller screens</span>
|
||||||
|
<span class="fore-tertiary"><!-- or --></span>
|
||||||
|
<span class="hidden-sm visually-hidden-lg">Hidden in smaller screens, visually hidden in larger screens, visible in medium-sized screens</span></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can combine responsive visibility helpers for different sizes, based on your needs.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><span class="hidden-sm visually-hidden-sm">Not a good idea</span></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid combining responsive visibility helpers for the same screen size. Combining both of them might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="breadcrumbs">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Breadcrumbs</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
|
||||||
|
<div><br>
|
||||||
|
<ul class="breadcrumbs"> <li><a href="#">Root</a></li> <li><a href="#">Folder</a></li> <li>File</li> </ul><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
|
||||||
|
<p style="text-align:justify">Breadcrumbs are usually used to show the navigational hierarchy of pages or folders. To use them, simply create a <code><ul></code> element that implements the <code>.breadcrumbs</code> class. Inside this unordered list, add as many <code><li></code> elements as needed to show your hierarchy. You can add links to the list elements, as necessary.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><ul class="breadcrumbs">
|
||||||
|
<li><a href="#">Root</a></li>
|
||||||
|
<li><a href="#">Folder</a></li>
|
||||||
|
<li>File</li>
|
||||||
|
</ul></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>The separators between breadcrumbs are added using some tricky CSS rules. Due to that, there might be a few browser versions or devices where you can see part of the seams between the element separators.</li>
|
||||||
|
<li>Breadcrumbs show a hierarchy, an ordered list. However, we do not use the <code><ol></code> element, as it might conflict with some custom styles we've seen people use.</li>
|
||||||
|
<li>If you want to add some accesibility to your breadcrumbs, you can add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">"<a href="https://www.w3.org/TR/wai-aria/roles#navigation">navigation</a>"</span></code> attribute, although it is not required.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><ol class="breadcrumbs">
|
||||||
|
<li><a href="#">Does</a></li>
|
||||||
|
<li><a href="#">Not</a></li>
|
||||||
|
<li>Work</li>
|
||||||
|
</ol></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> The structure of the breadcrumb component prohibits the use of <code><ol></code> in place of the <code><ul></code> element.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
|
||||||
|
<pre><ul class="breadcrumbs">
|
||||||
|
<li><a href="#">Root</a>
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li><a href="#">Folder</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>File</li>
|
||||||
|
</ul></pre>
|
||||||
|
<p class="dont" style="text-align:justify"><mark class="secondary">Don't:</mark> Avoid nesting lists, breadcrumbs or a combination of the two inside the <code>.breadcrumbs</code> list, as this might cause unexpected behavior.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="close-icon">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card fluid">
|
||||||
|
<div class="section"><h2>Close icon</h2></div>
|
||||||
|
<div class="section row">
|
||||||
|
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
|
||||||
|
<div>
|
||||||
|
<br>
|
||||||
|
<p style="text-align:center;"> <span class="close"></span> </p>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
|
||||||
|
<p style="text-align:justify">To create a close icon, simply add an element implementing the <code>.close</code> class.</p>
|
||||||
|
<h3>Sample code</h3>
|
||||||
|
<pre><span class="close"></span></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<ul style="text-align:justify">
|
||||||
|
<li>The close icon behaves similar to a button when hovering over it or otherwise focusing or selecting it.</li>
|
||||||
|
</ul><hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><div class="close"></div></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> You can use a handful of other HTML elements instead of the <code><span></code> element showcased in the example above, most commonly <code><div></code> elements.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-6">
|
||||||
|
<pre><button class="close"></button></pre>
|
||||||
|
<p class="do" style="text-align:justify"><mark class="tertiary">Do:</mark> If you want your close icon to behave like a button (i.e. register as a button on screen readers and have the required logic attached to it), you can apply the <code>.close</code> class to a <code><button></code> element instead. You can even apply any of the button color variant classes.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p style="text-align:justify">If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules">modules page</a> and choose another module to see its documentation.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main></div></div></div>
|
||||||
|
<footer style="text-align:justify"><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue