mini.css a minimal Sass-y responsive mobile-first style-agnostic CSS framework

Below you can see each module in action, along with certain suggestions on how to add functionality to the various components. Bear in mind that this demo is for the Default flavor. Naming conventions may vary between flavors, however the structure and functionality of the modules should be the same. Please refer to specific flavors for those differences. The NiteOwl flavor uses the same naming conventions for the module components, so you won't have any trouble. If you are migrating from Bootstrap and want to use the Bootstrap flavor, most naming conventions are based on the original naming conventions of Bootstrap 3.3.7.


Base

The Base module contains customized typography rules, colors and most of the functionality provided in normalize.css. Below we showcase some of the most important typography styles.

Fonts, sizes and colors

The default flavor uses the Helvetica font family and a font-size of 1em with a line-height of 1.5. Colors used are #f5f5f5 for the background and #222 for the text. Most of the things in this module are subjective to one's preferences and should be changed according to your liking. Heading, <sub>, <sup> and <small> elements use multipliers, so changing the base font-size should affect those too. Apart from that, colors and styles for links can easily be changed, as well as a lot of other parameters. Images are responsive by default, so they will shrink to fit smaller viewports without any additional work. Below we highlight some important things, like heading and code styling, but you can see most of the typograhpy rules in action in these pages.

Headings

Example

Heading 1 small text

Heading 2 small text

Heading 3 small text

Heading 4 small text

Heading 5 small text
Heading 6 small text
<h1>Heading 1 <small>small text</small></h1>
<h2>Heading 2 <small>small text</small></h2>
<h3>Heading 3 <small>small text</small></h3>
<h4>Heading 4 <small>small text</small></h4>
<h5>Heading 5 <small>small text</small></h5>
<h6>Heading 6 <small>small text</small></h6>

Code, <pre> and <kbd> elements

Example

Inline code looks like this. User input looks like this. Finally, code blocks look like...

this! This is a code block!

<code>Inline code</code>
<kbd>User input</kbd>
<pre>Code block</pre>

Responsive grid

The grid system provided can be fully customized to use as many columns as you wish and have custom breakpoints for different device sizes. The default grid uses 12 columns (as shown below). Customized classes are also defined to hide certain columns in certain viewport sizes. This can be specifically used to customize column offseting on different devices.

Grid structure

The basic grid structure is as follows:

  • The outer wrapper of the grid system uses the .grid-container class.
  • Inside this wrapper, rows can be defined using the .row class.
  • Inside the rows, columns can be defined using the .col class.
  • Column width can be specified for different devices using the respective class prefixes (.xs-, .sm-, .md-, .lg-) followed by the width (in columns) of the specific column.
  • Columns can be hidden in certain viewports, using the -no suffix for the specific screen size.

12-column grid example

Example

1/12
1/12
1/12
1/12
1/12
1/12
1/12
1/12
1/12
1/12
1/12
1/12
1/6
1/6
1/6
1/6
1/6
1/6
1/4
1/4
1/4
1/4
1/3
1/3
1/3
1/2
1/2
1/1
<div class="grid-container">
  <div class="row">
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
    <div class="col xs-1">1/12</div>
  </div>
  <div class="row">
    <div class="col xs-2">1/6</div>
    <div class="col xs-2">1/6</div>
    <div class="col xs-2">1/6</div>
    <div class="col xs-2">1/6</div>
    <div class="col xs-2">1/6</div>
    <div class="col xs-2">1/6</div>
  </div>
  <div class="row">
    <div class="col xs-3">1/4</div>
    <div class="col xs-3">1/4</div>
    <div class="col xs-3">1/4</div>
    <div class="col xs-3">1/4</div>
  </div>
  <div class="row">
    <div class="col xs-4">1/3</div>
    <div class="col xs-4">1/3</div>
    <div class="col xs-4">1/3</div>
  </div>
  <div class="row">
    <div class="col xs-6">1/2</div>
    <div class="col xs-6">1/2</div>
  </div>
  <div class="row">
    <div class="col xs-12">1/1</div>
  </div>
</div>

The navigation system provided contains custom classes for the navigation bar, logo and links. Navigation bars can be horizontal or vertical, fixed or otherwise. Navigation bars are responsive by default, so fixed navigation bars will properly shrink down to a button on smaller screens and, when the menu is opened, it will be displayed on top of the page's content.

Navigation structure

The structure of the navigation system is as follows:

  • You should wrap your navigation system in a <div> with the .nav class.
  • If you want your navigation bar to be vertical (horizontal is the default), use the .vertical class.
  • If you want your navigation bar to be fixed, use the .fixed class.
  • Use an element with the .logo class for your website's logo.
  • For the navigation links, use an unordered list (<ul>) and inside each <li> element, add another element with the .link class to stylize the element as a navigation link.
  • Responsiveness can be added for fixed navigation bars by adding a hidden <input type="checkbox"> right before the navigation bar and a label linking to that specific checkbox right after the navigation bar.
  • Use autocomplete="off" to make your menu not open by default in mobile devices.

Horizontal navigation bar

Example



<div class="nav">
  <span class="logo">Logo</span>
  <ul>
    <li><a href="#" class="link">Link 1</a></li>
    <li><a href="#" class="link">Link 2</a></li>
  </ul>
</div>

Vertical navigation bar

Example



<div class="nav vertical">
  <span class="logo">Logo</span>
  <ul>
    <li><a href="#" class="link">Link 1</a></li>
    <li><a href="#" class="link">Link 2</a></li>
  </ul>
</div>

The dropdown module is an extra module that allows you to add dropdown components to your navigation bars. These components can be customized and work well on mobile devices. Using too many dropdowns or nesting dropdowns is yet undocumented and might cause unexpected behavior.

Dropdown structure

The basic structure of dropdowns is as follows

  • To add a dropdown component, add the .dropdown class to one of your link elements inside the navigation bar.
  • Add an <input type="checkbox"> with the .dropdown class and right after it a <div> element that contains an unordered list with list elements that contains navigation links, exactly like you would make a normal navigation menu.
  • For multiple dropdowns, you should use <input type="radio"> elements.
  • On mobile devices, there might be issues with the dropdown not closing after a link is clicked (mainly when it links to the same page). This can be easily dealt with using javascript (by making all the links inside the dropdown's <div> element uncheck the navigation bar's checkbox) or using <label> elements creatively inside the links.
  • Use autocomplete="off" to make your dropdown not open by default in mobile devices.

Horizontal navigation dropdown example

Example



<div class="nav">
  <span class="logo">Logo</span>
  <ul>
    <li><a href="#" class="link">Link 1</a></li>
    <li><label class="link dropdown" for="dropdown1">Dropdown</label></li>
  </ul>
  <input type="checkbox" id="dropdown1" class="dropdown" autocomplete="off">
  <div>
    <ul>
      <li><a href="#" class="link">Link 2</a></li>
      <li><a href="#" class="link">Link 3</a></li>
    </ul>
  </div>
</div>

Vertical navigation dropdown example

Example



<div class="nav vertical">
  <span class="logo">Logo</span>
  <ul>
    <li><a href="#" class="link">Link 1</a></li>
    <li><label class="link dropdown" for="dropdown1">Dropdown</label></li>
  </ul>
  <input type="checkbox" id="dropdown1" class="dropdown" autocomplete="off">
  <div>
    <ul>
      <li><a href="#" class="link">Link 2</a></li>
      <li><a href="#" class="link">Link 3</a></li>
    </ul>
  </div>
</div>

Tabs

The tabbed navigation module allows you to easily create tabbed navigation systems, that are fully customizable to fit your needs. Nested tabs are not supported and might cause unexpected behavior.

Tabbed navigation structure

The structure of the tabbed navigation system is as follows:

  • Use the .tabs class to specify the container for the tabbed navigation system.
  • For each tab use an <input type="radio">, immediately followed by a <div> element.
  • This last element should contain a <label> linking to the radio button of the tab and another <div> that will contain the tab's contents.
  • Specify the tab that will be open by default using the checked property on one of the radio buttons.

Tabbed navigation example *

Tab 1 content...
Tab 2 content...
Tab 3 content...
<div class="tabs">
  <input type="radio" name="tabs-radio" id="tab1" checked>
  <div>
    <label for="tab1">Tab 1</label>
    <div>Tab 1 content...</div>
  </div>
  <input type="radio" name="tabs-radio" id="tab2">
  <div>
    <label for="tab2">Tab 2</label>
    <div>Tab 2 content...</div>
  </div>
  <input type="radio" name="tabs-radio" id="tab3">
  <div>
    <label for="tab3">Tab 3</label>
    <div>Tab 3 content...</div>
  </div>
</div>

(*):Due to a minor incompatibility between panels and tabs, the above example is not shown like most of the others. Our most experienced teams of developers and designers are on this.

Tables

Tables can be easily stylized to look more modern, using stripes and selective borders (vertical only by default). Classes for horizontal only borders(.hor) and full borders(.bor) are also provided. Use the .tbl class in your <table> elements to easily apply your styling.

Default table example

Example


Column 1 Column 2
Name Value
Name Value
Name Value
Name Value

<table class="tbl">
  <thead>
    <th>Column 1</th> <th>Column 2</th>
  </thead>
  <tbody>
    <tr>
      <td>Name</td> <td>Value</td>
    </tr>
    <tr>
      <td>Name</td> <td>Value</td>
    </tr>
    <tr>
      <td>Name</td> <td>Value</td>
    </tr>
    <tr>
      <td>Name</td> <td>Value</td>
    </tr>
  </tbody>
</table>

Forms

Form customization and styling is easy using the .frm class in any <form> element. Inputs inside the form will be automatically styled and they will use complementary highlights for certain events (:focus, disabled, :invalid etc.). You can use the .aligned and .inline classes to create aligned and inline forms respectively. Aligned forms should be used in combination with the .ctrl-group class to group together labels with their respective inputs.

Vertical form

Example

<form class="frm">
  <label for="email1">Email</label>
  <input type="email" id="email1">
  <label for="password1">Password</label>
  <input type="password" id="password1">
</form>

Inline form

Example

<form class="frm inline">
  <label for="email1">Email</label>
  <input type="email" id="email1">
  <label for="password1">Password</label>
  <input type="password" id="password1">
</form>

Aligned form

Example

<form class="frm aligned">
  <div class="ctrl-group">
    <label for="email1">Email</label>
    <input type="email" id="email1">
  </div>
  <div class="ctrl-group">
    <label for="password1">Password</label>
    <input type="password" id="password1">
  </div>
</form>

Buttons

Use the .btn class on <button>, <a>, <label> or similar elements to give them a unique style. Color variants are provided (.red, .green and .blue), as well as size variants (.sm and .lg).

Button styles and variants

Example


                 

<button class="btn">Default button</button>
<button class="btn red">Red button</button>
<button class="btn green">Green button</button>
<button class="btn blue">Blue button</button>
<button class="btn sm">Small button</button>
<button class="btn lg">Large button</button>

Labels & Badges

Use the .lbl or .bdg class on any elements to style them like labels or badges. Color variants are provided (.red, .green and .blue) for both of these styles.

Labels and badge styles

Example


  Label Red label Green label Blue label 12 3 45 6

<span class="lbl">Label</span>
<span class="lbl red">Red label</span>
<span class="lbl green">Green label</span>
<span class="lbl blue">Blue label</span>

<span class="bdg">12</span>
<span class="bdg red">3</span>
<span class="bdg green">45</span>
<span class="bdg blue">6</span>