MinimalSize matters!
+ +
+
mini.css aims to provide as much functionality as possible in about 5KB gzipped. This very small footprint means that your websites and web applications will load faster, while still looking great utilising the modern components we provide!
+
ResponsiveThink mobile!
+ +
+
mini.css is crafted with both desktops and mobile devices in mind. All of its components are well-tested on different devices and will respond to any changes in the viewport, allowing for an experience tailored to each user's device!
+
Style-agnosticInfinitely customizable!
+ +
+
mini.css provides you with a customizable flavor system, allowing you to be a designer without all the hard work. This way you can create your own custom design and personalize your websites any way you want!
+
Setup and usage
+You can import he default flavor of mini.css in your webpage by simply adding the following reference inside your HTML page's <head>
tag:
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.0/dist/mini-default.min.css">
+
If you want to download the package using your favorite package manager, you can use either Bower or NPM:
+bower install mini.css+
npm install mini.css+
+
If you are interested in tinkering with the flavor files and cooking your own flavor, check out the Customization page for information, tips on how to get started and general guidelines.
++
Quick overview
+Take a couple of minutes to learn how mini.css differs from all those other UI toolkits (Bootstrap, Semantic UI etc):
+Name | +Version | +Size (uncompressed) | +Size (minified) | +Size (gzipped) | +
---|---|---|---|---|
Bootstrap | +v3.3.7 | +143 KB | +117 KB | +20 KB | +
Material Framework | +v3.0 | +114 KB | +90 KB | +18 KB | +
mini.css | +v2.0 | +47 KB | +36 KB | +7 KB | +
Semantic UI | +v2.2.6 | +730 KB | +550 KB | +95 KB | +
Zurb Foundation | +v3.0 | +90 KB | +64 KB | +12 KB | +
+
! The above comparison takes into account only the CSS files of each framework. mini.css's size is an approximation due to the nature of its flavor system. The calculated results were produced using Refresh-SF.
++
Module list
+-
+
- Core - Resets, typography rules and fixes +
- Grid - Powerful, responsive flexbox-based grid +
- Navigation - Common elements for navigation +
- Input Control - Forms, buttons and inputs +
- Table - Modern, responsive tables +
- Card - Sleek, modern content containers +
- Tab - Responsive tabs and accordions +
- Contextual - Contextual highlights and alerts +
- Progress - Modern progress bars and loaders +
- Utility - Utility and helper classes +
Why does mini.css have so few modules?
+Modules are what makes toolkits so powerful, by giving developers the essential components they need to structure and style their websites. mini.css simplifies the crafting and learning process for new developers by providing a handful of very powerful modules that can do many different things. This way, new developers will only have to learn a few different HTML structures and patterns, while having the ability to build a lot of interesting things with them. For example, cards can be used for almost any type of layout and can be customized to do exactly what the developer wants. Tabs, on the other hand, are very responsive on mobile, collapsing to a stack below a certain width, but they can also be forced into a stack, allowing accordions and collapses to be built using the same building block as tabs.
+Browser | +Not supported | +Partially supported | +Fully supported | +
---|---|---|---|
Internet Explorer | +8- | +9-10 | +11+ | +
Edge | +n/a | +n/a | +12+ | +
Firefox | +21- | +22-27 | +28+ | +
Chrome | +20- | +n/a | +21+ | +
Safari | +6- | +n/a | +6.1+ | +
Opera | +11.5- | +12.1-16 | +17+ | +
Android Browser | +4.3- | +n/a | +4.4+ | +
+
! Due to the way mini.css is crafted, some legacy browsers are not supported anymore and some others are partially supported. This could be a dealbreaker for some developers, however most legacy browsers will display a less feature-rich and modern website. Apart from the above table, note that some mobile browsers like Opera Mini, IE Mobile and UC Browser for Android are officially supported, but some features may not display or behave properly due to the browsers themselves.
++
Getting started
+If you are still here after reading this far, we will assume you are interested or at least curious. Based on that assumption, here are a few links to help get you started:
+-
+
- For a quick guide on getting started, you might wanna take a look at the available modules list and the tutorials provided for each one! +
- mini.css comes with a few nice pre-built customizable flavors. See which one of them better suits your needs! +
- If you are more experienced or demanding, you can always take a look at the customization section to cook up a flavor of your own custom-tailored to your needs! +
Modal dialog
This is a modal dialog.
-
-
- Introduction -
- Module overview - -
-
-
- Base -
- Responsive Grid -
- Navigation -
- Dropdowns -
- Tabs -
- Tables -
- Forms -
- Buttons -
- Labels -
- Modals -
- Collapse -
- Progress Bars -
- Carousel -
- Utilities & Helper Classes -
- Utilities & Experimental Classes -
-
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.
-To use the Default flavor, add the following code inside your HTML page's <head>
tag:
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v1.1.0/flavors/mini-default.min.css">
- -
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 typography 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>+
mini.css
+ v2.0Code, <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
-<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>-
- -
Navigation
-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>-
- -
Dropdowns
-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 *
-<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>+ +
Modules
+mini.css 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 mini.css.
+
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>-
- -
Modals
-Modal dialogs can be easily added and customized to the user's liking and offer support for the close button utility. Showing more than one modal dialog at once might have unexpected results and is not encouraged.
- -Modal dialog structure
-The basic structure of a modal dialog is as follows:
--
-
- Use the
.modal
class on an<input type="checkbox">
. Place this checkbox along with any other elements specified below at the very start of your<body>
.
- - Add a
<div>
right after the checkbox. Inside it add a second<div>
with your modal dialog's contents, as well as a<label>
for the checkbox without any content inside it. This label will act as the overlay behind the modal. If you do not want clicking the background to close the modal dialog, add the label without linking it to the checkbox.
- - If you have enabled close button support, you can add a
<span class="close">
inside a label for the checkbox in the innermost<div>
to add a close button to the top right corner of your modal dialog.
- - Finally, add a label linking to the modal dialog's checkbox anywhere in your page. You can also toggle the modal using Javascript, by setting the checkbox's state to
checked
.
-
Modal dialog example
-Example
-
-
<input type="checkbox" class="modal" id="modal1"> -<div> - <label for="modal1" autocomplete="off"></label> - <div> - <label for="modal1"> - <span class="close"></span> - </label> - <h3>Modal dialog</h3> - <hr> - <p>This is a modal dialog.</p> - </div> -</div> -... -<label for="modal1" class="btn red">Open modal</label>-
- -
Collapse
-The collapse module adds two components with similar functionality.
--
-
- Single collapse components can be created by adding the
.clps
class on an<input type="checkbox">
element, followed by a<div>
with the content to be hidden/shown based on the collapse's state.
- - Similarly, accordion collapse components can be created by adding the
.acrd
class to as many<input type="radio">
elements as you want. You should add a<label>
linking to each radio immediately after it, followed by a<div>
with the content to be hidden/shown based on the accordion's state.
- - You can use the single collapse component's styling for a set of radio buttons or the accordion's styling for a single checkbox if you would like to use a different styling for your collapse components without adding new CSS definitions. -
Single collapse style
-Example
-
-
-
<label for="collapse1" class="btn blue">Toggle collapse</label> -<input type="checkbox" class="clps" id="collapse1"> -<div>This text will be shown or hidden based on the above button.</div>-
Accordion style
-Example
-<input type="radio" class="acrd" id="acrd1" autocomplete="off" name="accordion"> -<label for="acrd1">First option</label> -<div>This is the first collapse of the accordion.</div> -<input type="radio" class="acrd" id="acrd2" autocomplete="off" name="accordion"> -<label for="acrd2">Second option</label> -<div>This is the second collapse of the accordion.</div> -<input type="radio" class="acrd" id="acrd3" autocomplete="off" name="accordion"> -<label for="acrd3">Third option</label> -<div>This is the final collapse of the accordion.</div>-
- -
Progress bars
-The progress bar module is very easy to use and extend. Simply create a <div>
with the .prg
class and inside it add a <span>
element with the desired style="width:XX%"
and you have a progress bar. Add text inside the <span>
element if you want. You can use the .green
or .red
variants for the <span>
element if you want to use different colors. Finally, you can always stack multiple progress bars, by simply adding more <span>
elements, just make sure their widths add up to 100% or less.
Default progress bar style
-Example
-
-
<div class="prg"><span style="width:60%;">60%</span></div>-
Progress bar variant styles
-Example
-
-
-
<div class="prg"><span class="green" style="width:40%;"></span></div> -<div class="prg"><span class="red" style="width:70%;"></span></div>-
Stacked progress bars
-Example
-
-
<div class="prg"> - <span class="red" style="width:30%;"></span> - <span class="green" style="width:20%;"></span> - <span style="width:40%;"></span> -</div>-
Progress spinners
-Example
-
Spinner dots:
-Spinner round:
--
<span class="spinner-dots"></span> -<span class="spinner-round"></span>-
- -
Carousel
-The carousel module allows you to create manually-controlled image slideshows for your pages. Nested carousels might cause unexpected behavior, please refrain from using them.
- -Carousel structure
-The base structure for the carousel component is as follows:
--
-
- Specify a carousel wrapper, using the
.carousel
class on a<div>
element.
- - Inside the wrapper, add the an
<input type="radio">
, followed immediately by a<div>
element. Inside the latter, add an<img>
element, followed by a<div>
element which will act as the image's description. Finally, right after closing the first<div>
element, add a<label>
linked to the radio button for the image.
- - Repeat the process as many times as you want to add more images. Remember that you cannot skip the description
<div>
element, even if it is empty, as it is required for the component to work properly.
- - Add the
checked
attribute to the first radio button of your carousel (or the one corresponding to the image you want to be displayed by default) to make the carousel work properly.
-
Auto-scrolling is not enabled by default in this carousel component. If you want the carousel to scroll automatically, you can check each of the radio buttons automatically using Javascript on set intervals. Using a similar technique you can pause the automatic scrolling when the user's cursor is inside the carousel.
- -Carousel example
-Example
-
First image
-This is a sample image description.
+Core
+The core module contains basic reset and fix rules, based on Normalize.css 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.
+ See moreSecond image
-This is another sample image description.
+Grid
+The grid module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as flexbox). 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.
+ See moreThird image
-This is yet another image description.
+Navigation
+The navigation 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 without complicated structures and hacks.
+ See more-
<div class="carousel"> - <input type="radio" name="carousel-control" id="crs1" checked> - <div> - <img src="favicon.png"> - <div> - <h3>First image</h3> - <p>This is a sample image description.</p> - </div> - </div> - <label for="crs1"></label> - <input type="radio" name="carousel-control" id="crs2"> - <div> - <img src="favicon.png" style="transform: scale(1,-1);"> - <div> - <h3>Second image</h3> - <p>This is another sample image description.</p> - </div> - </div> - <label for="crs2"></label> - <input type="radio" name="carousel-control" id="crs3"> - <div> - <img src="favicon.png" style="transform: scale(-1,-1);"> - <div> - <h3>Third image</h3> - <p>This is yet another image description.</p> - </div> - </div> - <label for="crs3"></label> -</div>-
- -
Utilities & Helper classes
-The core utilities module contains a set of useful utilities and helper classes to make common tasks easier when developing new pages.
- -Generic borders
-By using the opacity
CSS property in a creative way, along with border-radius
es, we have created utility classes that will create generic borders for virtually any element you want. Simply add the .bordered
class to create a generic border around an element. You can also use the .rounded
and .circle
classes (with or without the border style) to create reounded or circular corners for different elements accordingly.
Example
- Button with generic border:
- Image with generic border and rounded corners:
- Image with circular corners:
-
<button class="btn blue bordered">Button</button> -<img class="bordered rounded" src="favicon.png"> -<img class="circle" src="favicon.png">-
Contextual colors and backgrounds
-You can easily add contextual text or background color to certain textual elements by simply using one of the contextual prefixes (.txt-
and .bg-
respectively) and a color suffix (red
, green
or blue
).
Example
-Here is some text with contextual colors: red, green & blue.
- And here is some text with contextual backgrounds: red, green & blue.
<span class="txt-red">red text</span> -<span class="txt-green">green text</span> -<span class="txt-blue">blue text</span> - -<span class="bg-red">red background</span> -<span class="bg-green">green background</span> -<span class="bg-blue">blue background</span>-
Image thumbnails
-Image thumbnails can be used to stylize images by adding a custom border around them by simply using the .thumb
class.
Example
-
-
<img class="thumb" src="favicon.png">-
Utility symbols
-You can easily add carets and close symbols by using the .caret
and .close
classes respectively.
Example
- --
<span class="caret"></span> -<span class="close"></span>-
Helper classes
-Apart from the above utilities, there are some extra classes provided to help streamline the development process. Some of these classes use the !important
property to override other styles, so be careful when using them. The provided helper classes are as follows:
-
-
- Quick floats can be created using the
.drg-left
and.drg-right
classes.
- - Center content blocks can be created using the
.ct-block
class.
- - Utilize the popular micro clearfix hack using the
.cf
class.
- - Use the
.hidden
class to hide any content you wish.
-
Utilities & Experimental classes
-The extra utilities module contains some more useful utilities, as well as some more experimental and unstable utility classes, that some people might find of use. Any components marked as experimental might be unstable and behave unexpectedly, use at your own risk!
- -Breadcrumbs
-Create breadcrumbs to indicate the navigational hierarchy of a page's location, using the .brdcrmb
class on a list element.
Example
- -<ol class="brdcrmb"> - <li><a href="#">Core</a></li> - <li><a href="#">Modules</a></li> - <li>Utility</li> -</ol>-
Containers
-There are multiple types of generic containers provided:
--
-
- Wells can be created using the
.well
class and are the simplest type of generic container.
- - Alerts are similar to wells, but are contextualized can be toggled on or off (manually or using scripts). Use the
.alert-
prefix on an<input type="checkbox">
along with a color suffix (red
,green
orblue
) and a<div>
element to create an alert. Adding a<span class="close">
element inside a label pointing to the alert's checkbox will allow user to dismiss the alert.
- - Panels are similar to wells, but looks like application windows. You can create a panel using the
.panel
class and you can specify a title element for your panel using the.head
class on the very first element of your panel.
-
Example
- Well:
-
- Alerts:
-
-
-
- Panel:
-
Panel head
-This is a panel.
--
<div class="well">This is a well.</div> - -<input type="checkbox" id="alert1" class="alert-red" checked> -<div>This is a red alert without a close button.</div> -<input type="checkbox" id="alert2" class="alert-green" checked> -<div>This is a green alert with a <a href="#">link</a> but no close button either.</div> -<input type="checkbox" id="alert3" class="alert-blue" checked> -<div>This is a blue alert with a close button. <label for="alert3"><span class="close"></span></label></div> - -<div class="panel"> - <h3 class="head">Panel head</h3> - <p>This is a panel.</p> -</div>-
Popovers
-You can show a small overlay of content when the user clicks on specific elements using the .popover-
prefix on an <input type="checkbox">
along with the top
or bottom
suffix. Add a <label>
right after the checkbox linked to it and inside it add another element with the popover's class you are using. When you click the label, the popover will appear above or below the label. Click on the label again or the popover text itself to hide it.
Example
- - -
-
<input type="checkbox" id="popover1" class="popover-top" autocomplete="off"> -<label for="popover1" class="btn green">Open top popover - <span class="popover-top">This is the popover text.</span> -</label> - -<input type="checkbox" id="popover2" class="popover-bottom" autocomplete="off"> -<label for="popover2" class="btn red">Open bottom popover - <span class="popover-bottom">This is the popover text.</span> -</label>-
Experimental components
-There are two experimental components provided, stateful buttons and button groups: -
- To create a stateful button apply the
.stateful
class to an<input type="checkbox">
, followed by two labels (the first is for the inactive state and the second one for the active state).This component is not enabled by default as it is unstable, you can enable it manually.
- - To create a button group, use the
.btn-grp
class to wrap a set of.btn
elements.This component is considered stable enough, so it is enabled by default, you can disable it manually.
Example
- -<input type="checkbox" id="stateful1" class="stateful" autocomplete="off"> -<label for="stateful1" class="btn blue">Click to load</label> -<label class="btn blue">Loading...</label> - -<div class="btn-grp"> - <button class="btn">1</button> - <button class="btn">2</button> - <button class="btn">3</button> - <button class="btn">4</button> -</div>-
- +
Input Control
+The input_control 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.
+ See more +mini.css was designed and built by @Chalarangelo. It is licensed under the MIT License. You can view the project's source code on Github.
+Table
+The table 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.
+ See more +Card
+The card 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.
+ See more +Tab
+The tab 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.
+ See more +Contextual
+The contextual module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. The contextual alerts aim to replace the commonly used modal dialog design paradigm with a more modern one. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.
+ See more +Progress
+The progress 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.
+ See more +Utility
+The utility 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.
+ See more +-
+
- Introduction +
- Module overview + +
-
+
- Base +
- Responsive Grid +
- Navigation +
- Dropdowns +
- Tabs +
- Tables +
- Forms +
- Buttons +
- Labels +
- Modals +
- Collapse +
- Progress Bars +
- Carousel +
- Utilities & Helper Classes +
- Utilities & Experimental Classes +
+
mini.css a minimal Sass-y responsive mobile-first style-agnostic CSS framework
+If you want to create your own flavor, get involved or report an issue, head over to mini.css's Github repository or the wiki. If you want to give mini.css a try using the default flavor, paste the following code inside your HTML page's <head>
tag:
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v1.1.0/flavors/mini-default.min.css">+ +
If you'd rather use a package manager, mini.css is available in both Bower and NPM:
+ bower install mini.css
+ npm install mini.css
+ +
Why mini.css?
+
-
+
- Size matters! - The key focus of mini.css is to provide developers with a very light framework to build their pages with. To accomplish this, we stripped down most of the commonly-used components to their essentials, utilising the magic of CSS. By building lighter components, using only CSS, we made mini.css really tiny, just under 5KB for the default flavor. + +
- Easily customize your pages! - mini.css does not rely on a huge monolithic CSS file to do everything. In fact, we split the framework into smaller modules using Sass(SCSS), so you can easily distinguish what pieces you want in your final stylesheet. But that's not all! Every single detail of the provided modules can be changed, from colors and border styles to class names and structure. It's all really simple and you can do it without a lot of CSS or Sass knowledge. These customized stylesheets are called flavors and are one of the key differences between mini.css and other frameworks. + +
- We are mobile-friendly!* - That's right! We built mini.css from the ground up to support mobile devices as best as possible and be responsive. All of this functionality can be fully customized to suit your end-users. + +
- No Javascript! - As much as we all love Javascript, we tried to keep all of the modules in mini.css pure CSS. This means no dependencies on Javascript libraries or excessive code for events you might never use. + +
What does it contain?
+mini.css is split up into modules, each with a specific focus or set of components. These modules are categorized under core modules and extra modules. We suggest that you use most of the core modules in your projects, as most projects can make good use of them. As for the extra modules, we suggest you carefully pick the ones you need for your project. Below is a quick overview of all the modules:
+ +-
+
+
Core : Base
A modified version of normalize.css combined with a long list of variables produces a customized base for your projects along with typography rules and colors.
+
+ Core : Responsive Grid
A customizable reponsive grid that lets you build pages that look great on all devices wih minimal tweaking..
+
+ Core : Navigation
A customizable responsive navigation bar for your pages.
+
+ Extra : Navigation - Dropdown
The navigation system can easily be extended using the dropdown component.
+
+ Extra : Navigation - Tabs
If you would rather use tabs instead of the usual navigation bar, you can use this module to enable tabbed navigation.
+
+ Core : Tables
Give a fresh style to your tables without overloading your page.
+
+ Core : Forms
Simple, elegant and light forms that will work well and give feedback to the user.
+
+ Core : Buttons
Tiny button styles that allow you to beautify your buttons, labels and links.
+
+ Extra : Labels & Badges
Small badges and labels to provide your user's with all the info they need.
+
+ Extra : Modals
Modal dialog prompts to notify your users the easy way.
+
+ Extra : Collapse
Hide and show text using customizable collapse buttons.
+
+ Extra : Progress Bars
A simple module that allows you to create progess bars for your pages.
+
+ Extra : Carousel
Really light and customizable imaage slideshow for all your showcase needs.
+
+ Core : Utilities & Helper Classes
Classes for generic borders, image thumbnails, contextual text coloring, utility buttons and more.
+
+ Extra : Utilities & Experimental Classes
Breadcrumbs, containers, panels, alerts, popovers, button groups and more.
+
+
mini.css was designed and built by @Chalarangelo. It is licensed under the MIT License. You can view the project's source code on Github.
+Modal dialog
This is a modal dialog.
-
+
- Introduction +
- Module overview + +
-
+
- Base +
- Responsive Grid +
- Navigation +
- Dropdowns +
- Tabs +
- Tables +
- Forms +
- Buttons +
- Labels +
- Modals +
- Collapse +
- Progress Bars +
- Carousel +
- Utilities & Helper Classes +
- Utilities & Experimental Classes +
+
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.
+To use the Default flavor, add the following code inside your HTML page's <head>
tag:
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v1.1.0/flavors/mini-default.min.css">
+ +
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 typography 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
+<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>+
+ +
Navigation
+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>+
+ +
Dropdowns
+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 *
+<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>+
+ +
Modals
+Modal dialogs can be easily added and customized to the user's liking and offer support for the close button utility. Showing more than one modal dialog at once might have unexpected results and is not encouraged.
+ +Modal dialog structure
+The basic structure of a modal dialog is as follows:
+-
+
- Use the
.modal
class on an<input type="checkbox">
. Place this checkbox along with any other elements specified below at the very start of your<body>
.
+ - Add a
<div>
right after the checkbox. Inside it add a second<div>
with your modal dialog's contents, as well as a<label>
for the checkbox without any content inside it. This label will act as the overlay behind the modal. If you do not want clicking the background to close the modal dialog, add the label without linking it to the checkbox.
+ - If you have enabled close button support, you can add a
<span class="close">
inside a label for the checkbox in the innermost<div>
to add a close button to the top right corner of your modal dialog.
+ - Finally, add a label linking to the modal dialog's checkbox anywhere in your page. You can also toggle the modal using Javascript, by setting the checkbox's state to
checked
.
+
Modal dialog example
+Example
+
+
<input type="checkbox" class="modal" id="modal1"> +<div> + <label for="modal1" autocomplete="off"></label> + <div> + <label for="modal1"> + <span class="close"></span> + </label> + <h3>Modal dialog</h3> + <hr> + <p>This is a modal dialog.</p> + </div> +</div> +... +<label for="modal1" class="btn red">Open modal</label>+
+ +
Collapse
+The collapse module adds two components with similar functionality.
+-
+
- Single collapse components can be created by adding the
.clps
class on an<input type="checkbox">
element, followed by a<div>
with the content to be hidden/shown based on the collapse's state.
+ - Similarly, accordion collapse components can be created by adding the
.acrd
class to as many<input type="radio">
elements as you want. You should add a<label>
linking to each radio immediately after it, followed by a<div>
with the content to be hidden/shown based on the accordion's state.
+ - You can use the single collapse component's styling for a set of radio buttons or the accordion's styling for a single checkbox if you would like to use a different styling for your collapse components without adding new CSS definitions. +
Single collapse style
+Example
+
+
+
<label for="collapse1" class="btn blue">Toggle collapse</label> +<input type="checkbox" class="clps" id="collapse1"> +<div>This text will be shown or hidden based on the above button.</div>+
Accordion style
+Example
+<input type="radio" class="acrd" id="acrd1" autocomplete="off" name="accordion"> +<label for="acrd1">First option</label> +<div>This is the first collapse of the accordion.</div> +<input type="radio" class="acrd" id="acrd2" autocomplete="off" name="accordion"> +<label for="acrd2">Second option</label> +<div>This is the second collapse of the accordion.</div> +<input type="radio" class="acrd" id="acrd3" autocomplete="off" name="accordion"> +<label for="acrd3">Third option</label> +<div>This is the final collapse of the accordion.</div>+
+ +
Progress bars
+The progress bar module is very easy to use and extend. Simply create a <div>
with the .prg
class and inside it add a <span>
element with the desired style="width:XX%"
and you have a progress bar. Add text inside the <span>
element if you want. You can use the .green
or .red
variants for the <span>
element if you want to use different colors. Finally, you can always stack multiple progress bars, by simply adding more <span>
elements, just make sure their widths add up to 100% or less.
Default progress bar style
+Example
+
+
<div class="prg"><span style="width:60%;">60%</span></div>+
Progress bar variant styles
+Example
+
+
+
<div class="prg"><span class="green" style="width:40%;"></span></div> +<div class="prg"><span class="red" style="width:70%;"></span></div>+
Stacked progress bars
+Example
+
+
<div class="prg"> + <span class="red" style="width:30%;"></span> + <span class="green" style="width:20%;"></span> + <span style="width:40%;"></span> +</div>+
Progress spinners
+Example
+
Spinner dots:
+Spinner round:
++
<span class="spinner-dots"></span> +<span class="spinner-round"></span>+
+ +
Carousel
+The carousel module allows you to create manually-controlled image slideshows for your pages. Nested carousels might cause unexpected behavior, please refrain from using them.
+ +Carousel structure
+The base structure for the carousel component is as follows:
+-
+
- Specify a carousel wrapper, using the
.carousel
class on a<div>
element.
+ - Inside the wrapper, add the an
<input type="radio">
, followed immediately by a<div>
element. Inside the latter, add an<img>
element, followed by a<div>
element which will act as the image's description. Finally, right after closing the first<div>
element, add a<label>
linked to the radio button for the image.
+ - Repeat the process as many times as you want to add more images. Remember that you cannot skip the description
<div>
element, even if it is empty, as it is required for the component to work properly.
+ - Add the
checked
attribute to the first radio button of your carousel (or the one corresponding to the image you want to be displayed by default) to make the carousel work properly.
+
Auto-scrolling is not enabled by default in this carousel component. If you want the carousel to scroll automatically, you can check each of the radio buttons automatically using Javascript on set intervals. Using a similar technique you can pause the automatic scrolling when the user's cursor is inside the carousel.
+ +Carousel example
+Example
+
First image
+This is a sample image description.
+Second image
+This is another sample image description.
+Third image
+This is yet another image description.
++
<div class="carousel"> + <input type="radio" name="carousel-control" id="crs1" checked> + <div> + <img src="favicon.png"> + <div> + <h3>First image</h3> + <p>This is a sample image description.</p> + </div> + </div> + <label for="crs1"></label> + <input type="radio" name="carousel-control" id="crs2"> + <div> + <img src="favicon.png" style="transform: scale(1,-1);"> + <div> + <h3>Second image</h3> + <p>This is another sample image description.</p> + </div> + </div> + <label for="crs2"></label> + <input type="radio" name="carousel-control" id="crs3"> + <div> + <img src="favicon.png" style="transform: scale(-1,-1);"> + <div> + <h3>Third image</h3> + <p>This is yet another image description.</p> + </div> + </div> + <label for="crs3"></label> +</div>+
+ +
Utilities & Helper classes
+The core utilities module contains a set of useful utilities and helper classes to make common tasks easier when developing new pages.
+ +Generic borders
+By using the opacity
CSS property in a creative way, along with border-radius
es, we have created utility classes that will create generic borders for virtually any element you want. Simply add the .bordered
class to create a generic border around an element. You can also use the .rounded
and .circle
classes (with or without the border style) to create reounded or circular corners for different elements accordingly.
Example
+ Button with generic border:
+ Image with generic border and rounded corners:
+ Image with circular corners:
+
<button class="btn blue bordered">Button</button> +<img class="bordered rounded" src="favicon.png"> +<img class="circle" src="favicon.png">+
Contextual colors and backgrounds
+You can easily add contextual text or background color to certain textual elements by simply using one of the contextual prefixes (.txt-
and .bg-
respectively) and a color suffix (red
, green
or blue
).
Example
+Here is some text with contextual colors: red, green & blue.
+ And here is some text with contextual backgrounds: red, green & blue.
<span class="txt-red">red text</span> +<span class="txt-green">green text</span> +<span class="txt-blue">blue text</span> + +<span class="bg-red">red background</span> +<span class="bg-green">green background</span> +<span class="bg-blue">blue background</span>+
Image thumbnails
+Image thumbnails can be used to stylize images by adding a custom border around them by simply using the .thumb
class.
Example
+
+
<img class="thumb" src="favicon.png">+
Utility symbols
+You can easily add carets and close symbols by using the .caret
and .close
classes respectively.
Example
+ ++
<span class="caret"></span> +<span class="close"></span>+
Helper classes
+Apart from the above utilities, there are some extra classes provided to help streamline the development process. Some of these classes use the !important
property to override other styles, so be careful when using them. The provided helper classes are as follows:
-
+
- Quick floats can be created using the
.drg-left
and.drg-right
classes.
+ - Center content blocks can be created using the
.ct-block
class.
+ - Utilize the popular micro clearfix hack using the
.cf
class.
+ - Use the
.hidden
class to hide any content you wish.
+
Utilities & Experimental classes
+The extra utilities module contains some more useful utilities, as well as some more experimental and unstable utility classes, that some people might find of use. Any components marked as experimental might be unstable and behave unexpectedly, use at your own risk!
+ +Breadcrumbs
+Create breadcrumbs to indicate the navigational hierarchy of a page's location, using the .brdcrmb
class on a list element.
Example
+ +<ol class="brdcrmb"> + <li><a href="#">Core</a></li> + <li><a href="#">Modules</a></li> + <li>Utility</li> +</ol>+
Containers
+There are multiple types of generic containers provided:
+-
+
- Wells can be created using the
.well
class and are the simplest type of generic container.
+ - Alerts are similar to wells, but are contextualized can be toggled on or off (manually or using scripts). Use the
.alert-
prefix on an<input type="checkbox">
along with a color suffix (red
,green
orblue
) and a<div>
element to create an alert. Adding a<span class="close">
element inside a label pointing to the alert's checkbox will allow user to dismiss the alert.
+ - Panels are similar to wells, but looks like application windows. You can create a panel using the
.panel
class and you can specify a title element for your panel using the.head
class on the very first element of your panel.
+
Example
+ Well:
+
+ Alerts:
+
+
+
+ Panel:
+
Panel head
+This is a panel.
++
<div class="well">This is a well.</div> + +<input type="checkbox" id="alert1" class="alert-red" checked> +<div>This is a red alert without a close button.</div> +<input type="checkbox" id="alert2" class="alert-green" checked> +<div>This is a green alert with a <a href="#">link</a> but no close button either.</div> +<input type="checkbox" id="alert3" class="alert-blue" checked> +<div>This is a blue alert with a close button. <label for="alert3"><span class="close"></span></label></div> + +<div class="panel"> + <h3 class="head">Panel head</h3> + <p>This is a panel.</p> +</div>+
Popovers
+You can show a small overlay of content when the user clicks on specific elements using the .popover-
prefix on an <input type="checkbox">
along with the top
or bottom
suffix. Add a <label>
right after the checkbox linked to it and inside it add another element with the popover's class you are using. When you click the label, the popover will appear above or below the label. Click on the label again or the popover text itself to hide it.
Example
+ + +
+
<input type="checkbox" id="popover1" class="popover-top" autocomplete="off"> +<label for="popover1" class="btn green">Open top popover + <span class="popover-top">This is the popover text.</span> +</label> + +<input type="checkbox" id="popover2" class="popover-bottom" autocomplete="off"> +<label for="popover2" class="btn red">Open bottom popover + <span class="popover-bottom">This is the popover text.</span> +</label>+
Experimental components
+There are two experimental components provided, stateful buttons and button groups: +
- To create a stateful button apply the
.stateful
class to an<input type="checkbox">
, followed by two labels (the first is for the inactive state and the second one for the active state).This component is not enabled by default as it is unstable, you can enable it manually.
+ - To create a button group, use the
.btn-grp
class to wrap a set of.btn
elements.This component is considered stable enough, so it is enabled by default, you can disable it manually.
Example
+ +<input type="checkbox" id="stateful1" class="stateful" autocomplete="off"> +<label for="stateful1" class="btn blue">Click to load</label> +<label class="btn blue">Loading...</label> + +<div class="btn-grp"> + <button class="btn">1</button> + <button class="btn">2</button> + <button class="btn">3</button> + <button class="btn">4</button> +</div>+
+ +
mini.css was designed and built by @Chalarangelo. It is licensed under the MIT License. You can view the project's source code on Github.
+mini.css
- v2.0 -MinimalSize matters!
- -
-
mini.css aims to provide as much functionality as possible in about 5KB gzipped. This very small footprint means that your websites and web applications will load faster, while still looking great utilising the modern components we provide!
-
ResponsiveThink mobile!
- -
-
mini.css is crafted with both desktops and mobile devices in mind. All of its components are well-tested on different devices and will respond to any changes in the viewport, allowing for an experience tailored to each user's device!
-
Style-agnosticInfinitely customizable!
- -
-
mini.css provides you with a customizable flavor system, allowing you to be a designer without all the hard work. This way you can create your own custom design and personalize your websites any way you want!
-
Setup and usage
-You can import he default flavor of mini.css in your webpage by simply adding the following reference inside your HTML page's <head>
tag:
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.0/dist/mini-default.min.css">
-
If you want to download the package using your favorite package manager, you can use either Bower or NPM:
-bower install mini.css-
npm install mini.css-
-
If you are interested in tinkering with the flavor files and cooking your own flavor, check out the Customization page for information, tips on how to get started and general guidelines.
--
Quick overview
-Take a couple of minutes to learn how mini.css differs from all those other UI toolkits (Bootstrap, Semantic UI etc):
-Name | -Version | -Size (uncompressed) | -Size (minified) | -Size (gzipped) | -
---|---|---|---|---|
Bootstrap | -v3.3.7 | -143 KB | -117 KB | -20 KB | -
Material Framework | -v3.0 | -114 KB | -90 KB | -18 KB | -
mini.css | -v2.0 | -47 KB | -36 KB | -7 KB | -
Semantic UI | -v2.2.6 | -730 KB | -550 KB | -95 KB | -
Zurb Foundation | -v3.0 | -90 KB | -64 KB | -12 KB | -
-
! The above comparison takes into account only the CSS files of each framework. mini.css's size is an approximation due to the nature of its flavor system. The calculated results were produced using Refresh-SF.
--
Module list
--
-
- Core - Resets, typography rules and fixes -
- Grid - Powerful, responsive flexbox-based grid -
- Navigation - Common elements for navigation -
- Input Control - Forms, buttons and inputs -
- Table - Modern, responsive tables -
- Card - Sleek, modern content containers -
- Tab - Responsive tabs and accordions -
- Contextual - Contextual highlights and alerts -
- Progress - Modern progress bars and loaders -
- Utility - Utility and helper classes -
Why does mini.css have so few modules?
-Modules are what makes toolkits so powerful, by giving developers the essential components they need to structure and style their websites. mini.css simplifies the crafting and learning process for new developers by providing a handful of very powerful modules that can do many different things. This way, new developers will only have to learn a few different HTML structures and patterns, while having the ability to build a lot of interesting things with them. For example, cards can be used for almost any type of layout and can be customized to do exactly what the developer wants. Tabs, on the other hand, are very responsive on mobile, collapsing to a stack below a certain width, but they can also be forced into a stack, allowing accordions and collapses to be built using the same building block as tabs.
-Browser | -Not supported | -Partially supported | -Fully supported | -
---|---|---|---|
Internet Explorer | -8- | -9-10 | -11+ | -
Edge | -n/a | -n/a | -12+ | -
Firefox | -21- | -22-27 | -28+ | -
Chrome | -20- | -n/a | -21+ | -
Safari | -6- | -n/a | -6.1+ | -
Opera | -11.5- | -12.1-16 | -17+ | -
Android Browser | -4.3- | -n/a | -4.4+ | -
-
! Due to the way mini.css is crafted, some legacy browsers are not supported anymore and some others are partially supported. This could be a dealbreaker for some developers, however most legacy browsers will display a less feature-rich and modern website. Apart from the above table, note that some mobile browsers like Opera Mini, IE Mobile and UC Browser for Android are officially supported, but some features may not display or behave properly due to the browsers themselves.
--
Getting started
-If you are still here after reading this far, we will assume you are interested or at least curious. Based on that assumption, here are a few links to help get you started:
--
-
- For a quick guide on getting started, you might wanna take a look at the available modules list and the tutorials provided for each one! -
- mini.css comes with a few nice pre-built customizable flavors. See which one of them better suits your needs! -
- If you are more experienced or demanding, you can always take a look at the customization section to cook up a flavor of your own custom-tailored to your needs! -
mini.css
- v2.0 -Modules
-mini.css 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 mini.css.
-
Core
-The core module contains basic reset and fix rules, based on Normalize.css 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.
- See more -Grid
-The grid module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as flexbox). 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.
- See more -Navigation
-The navigation 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 without complicated structures and hacks.
- See more -Input Control
-The input_control 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.
- See more -Table
-The table 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.
- See more -Card
-The card 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.
- See more -Tab
-The tab 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.
- See more -Contextual
-The contextual module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. The contextual alerts aim to replace the commonly used modal dialog design paradigm with a more modern one. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.
- See more -Progress
-The progress 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.
- See more -Utility
-The utility 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.
- See more -