<ahref="core.html#lists"class="sublink-1">Lists</a><ahref="core.html#images-captions"class="sublink-1">Image responsiveness & captions</a>
<br/><ahref="grid.html#grid-title">Grid</a>
<ahref="grid.html#basic-layout"class="sublink-1">Basic layout</a><ahref="grid.html#screen-specific-layout"class="sublink-1">Screen specific layouts</a>
<ahref="input_control.html#forms-input"class="sublink-1">Forms & input</a><ahref="input_control.html#checkbox-radio"class="sublink-1">Checkboxes & radio buttons</a>
<ahref="input_control.html#buttons"class="sublink-1">Buttons & button groups</a><ahref="input_control.html#file-upload"class="sublink-1">File upload buttons</a>
<br/><ahref="table.html#table-title">Table</a>
<ahref="table.html#syntax-responsiveness"class="sublink-1">Basic syntax & responsiveness</a>
<ahref="table.html#horizontal-tables"class="sublink-1">Horizontal tables</a><ahref="table.html#variants-matrices"class="sublink-1">Table variants & matrices</a>
<br/><ahref="card.html#card-title">Card</a>
<ahref="card.html#basic-syntax"class="sublink-1">Basic syntax</a><ahref="card.html#sections-media"class="sublink-1">Sections & media</a>
<ahref="card.html#sizing-fluidity"class="sublink-1">Card sizing & fluidity</a>
<ahref="progress.html#basic-progress-bar"class="sublink-1">Basic progress bar</a><ahref="progress.html#progress-variants"class="sublink-1">Progress bar variants</a>
<ahref="utility.html#visibility-helpers"class="sublink-1">Visibility helpers</a><ahref="utility.html#borders-shadows"class="sublink-1">Generic borders & shadows</a>
<ahref="utility.html#responsive-sizing"class="sublink-1">Responsive sizing & spacing classes</a>
<p>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><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/>
<p>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>
<divclass="section">
<h2>Quick start</h2>
<p>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><br>
<p>You can hide content for all your users, using the default <code><spanclass="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>
<li>Both classes utilize <code><spanclass="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
</ul><hr>
<divclass="row">
<divclass="col-sm-12">
<pre><span class="hidden visually-hidden">Not a good idea</span></pre>
<pclass="dont"><markclass="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><spanclass="fore-secondary">aria-hidden</span>=<spanclass="fore-primary">"true"</span></code> to hide it for screen-reader-only users.</p>
<p>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><spanclass="fore-secondary">box-shadow</span></code> to any element.</p>
<li>All of these classes utilize <code><spanclass="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>
<pclass="dont"><markclass="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>
<divclass="section"><h2>Responsive sizing & spacing classes</h2></div>
<divclass="section row">
<divclass="col-sm-12 col-sm-first">
<p>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>
<li>If the default values of these classes are not suited to your needs, check out the <ahref="customization.html">customization</a> page.</li>
<li>Both classes utilize <code><spanclass="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
</ul><hr>
<divclass="row">
<divclass="col-sm-12">
<pre><div class="responsive-padding responsive-margin">Responsive padding and margin</div></pre>
<pclass="do"><markclass="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>
<p>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-<spanclass="fore-primary">SCR_SZ</span></code> syntax, replacing <code><spanclass="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><spanclass="fore-tertiary">sm</span></code> for smaller screens, <code><spanclass="fore-tertiary">md</span></code> for medium-sized screens or <code><spanclass="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>
<divclass="section">
<h3>Notes</h3>
<ul>
<li>Responsive visibility helper classes utilize <code><spanclass="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>
<divclass="row">
<divclass="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>
<spanclass="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>
<spanclass="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>
<pclass="do"><markclass="tertiary">Do:</mark> You can combine responsive visibility helpers for different sizes, based on your needs.</p>
<pre><span class="hidden-sm visually-hidden-sm">Not a good idea</span></pre>
<pclass="dont"><markclass="secondary">Don't:</mark> Avoid combining responsive visibility helpers for the same screen size. Combining both of them might cause unexpected behavior.</p>
<p>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>
<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><spanclass="fore-secondary">role</span>=<spanclass="fore-primary">"<ahref="https://www.w3.org/TR/wai-aria/roles#navigation">navigation</a>"</span></code> attribute, although it is not required.</li>
<pclass="dont"><markclass="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>
<pclass="dont"><markclass="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>
<pclass="do"><markclass="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>
<pclass="do"><markclass="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>
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <ahref="modules.html">modules page</a> and choose another module to see its documentation.</p>
<footer><strong>mini.css</strong> was designed and built with <iclass="fa fa-heart-o"aria-hidden="true"></i> by <ahref="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <ahref="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <ahref="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>