Introduction Module Overview Module Demos Flavors Customization Github

mini.css

v2.0

Minimal



mini.css is one of the lightest front-end frameworks on the web: about 5KB gzipped. This helps your websites load faster, while still looking great!

Reponsive



mini.css is built in such a way that it will look great on most devices and especially phones and tablets. This allows you to easily tailor your websites to different users!

Style-agnostic



mini.css gives you the power of customization, using its fully moddable flavors. This will give you control over how your websites look and allow great designs to stand out!



Below you can see a showcase of the features and styles included in the default flavor of mini.css.

Typography Styles for common textual elements

Heading 1 Subheading

Heading 2 Subheading

Heading 3 Subheading

Heading 4 Subheading

Heading 5 Subheading
Heading 6 Subheading

This is a paragraph with some sample text. Did you know mini.css v2.0 is codenamed Fermion? No? Well, now you do! Maybe you want to know what our inline elements look like. For example a link to the Github repository of mini.css looks like that! Neat, right? Maybe you want to see some inline code or some sample input. Oh, also small text is cool, along with its siblings: the subscripthi! and the superscripthello!. We use highlights quite a lot as well. Apart from the primary color, you can also try the secondary and tertiary colors. If you wanna be fancy, maybe use a tag or a bubble. All of these work well inside headings and the like. To finish our typography tour, check out the preformatted code block below.


function sum(num1, num2) {
    var num3 = num1 + num2;
    console.log('Result: ' + num3);
}

This is an alert

Alerts are important


Grid system Easy layout using flexbox

mini.css uses the Flexible Layout Module (commonly known as flexbox) to create a grid system for easy page layout. The grid system is not the most feature-rich one, but it contains all the essential components. The container of the grid is fluid by default, meaning it will adjust to fill its parent container. Rows are easily created using the row class and columns can be created using the usual col-SZ-XX syntax where SZ and XX are replaced by a screen size and a number of vertical columns respectively. Columns can also scale themselves automatically if you omit the number of vertical columns in the class name. Similarly, you can use offsets with the col-SZ-offset-XX syntax. The default grid is separated into 12 vertical columns. You can see some examples below.



Common Elements Styles for common HTML elements

mini.css adds modern styles for many of the HTML elements.


Tables

Tables are responsive and use the data-label attribute to specify the header name for each cell, so that they can be displayed as cards on mobile devices. Here's an example (resize to see mobile display if you are on desktop):

Hacker List
Name Surname Email Handle
John Smith johnsmith@mail.com SmithereensJohn
Lisa Cody codyl@mail.com Codyl
Max Roberts terminus@mail.com T3rm1nu5
Adam Leeks leekt@mail.com Leekt

Hacker List
Name Surname Email Handle
John Smith johnsmith@mail.com SmithereensJohn
Lisa Cody codyl@mail.com Codyl
Max Roberts terminus@mail.com T3rm1nu5
Adam Leeks leekt@mail.com Leekt

Forms

Forms are inline by default and textual <input>, <textarea> and <select> elements have been pre-styled. To make inputs take up more space than their default, simply add something like width="100%". You can also utilize the grid system to align forms to your liking. Below are some examples:

Inline form (default style):
 
 

Aligned form (using width and grid):

More inputs

Navigation

Use the <header>, <nav> and <footer> elements to add navigational elements to your page. The <header> element displays as a non-fixed horizontal bar and can contain a logo along with a set of links or buttons. Style any links using the .button class to give them the proper style. it is suggested that you place the <header> element outside of your grid system's .container to avoid styling problems. You can see an example below:

Link 2

<nav> implements the traditional navigation sidebar, using simple styling. The sidebar is not fixed by default and it has no specific width set, so you can use the grid system or some Javascript code to show or hide it and decide its size. Use simple links and <span> elements to add links and categories. The .sublink-1 and .sublink-2 classes can be added to create links in categories and subcategories. Below you can see an example (sidebar is displayed next to text on medium-large displays, but fills the whole display on phones and smaller screens):

This is some sample content that will show next to the navigation menu. Which means that we'll have to present some more fun facts about mini.css to occupy this space. Well, here's a couple:

  • mini.css was inspired by Bootstrap and Pure.css. Its original goal was to build a framework with the stylistic fluff of Bootstrap, but nearly the size of Pure.css. The first version, codenamed Neutrino was well-received and was mostly a tech demo of what Fermion now offers.
  • mini.css v2.0 has been designed with modern browser compatibility and recent web standards in mind. Part of its aim is to reduce the footprint of websites by providing a customizable base to work with, while cutting down a lot of the fat that comes with premade stylesheets.

Finally, use the <footer> element to create your footer. Add links, images, credits. This element is not meant for main navigation, but many pages use it for some kind of navigation or other. Try to place the <footer> outside of the grid system for best results. Below is an example:


Buttons

Buttons are already pre-styled in mini.css to allow for consistent presentation. However, there is a lot you can do to customize them, as the pre-applied styles are mostly overrides for the default presentation styles. Pre-styled buttons and other button-like inputs can be seen below:

Link button

Button groups can also be created, utilising the .button-group class. Simply add a set of buttons in it and you're good to go. Check it out below:

Link button

File inputs are a sore spot in most frameworks, as they cannot be easily stylized using CSS. mini.css deals with the problem, using a workaround involving labels that use the button class, which applies the exact same style to those labels. Just link it to the <input type="file"> element of your choice and you're good to go. For example:


There are also different kinds of buttons, specifically primary, secondary and tertiary, as well as small and large buttons. All of these types can be specified as classes. For example:



Checkboxes and Radio buttons

Checkboxes and radio buttons are styled using the checkbox hack, while keeping things simple and adding just the needed consistency for those input types. Place an <input> (checkbox or radio button) and a linked <label> inside an .input-group and the controls will style themselves. To allow accessibility for those controls, you can use tabindex="0" on the <input> elements only. You can see some examples below:


Progress bars

The <progress> element is used for progress bars. There are three color variants (default, secondary and tertiary), as well as an inline class that displays the progress bar as an inline block, along with a nano variant for tiny progress bars. Below are some examples:





Inline progress:

Nano progress:


Utilities and Helpers Useful classes for common problems

The utilities provided with mini.css aim to solve common problems and allow ease of use whenever possible. Some of them are showcased below:

Generic border (using black outline and opacity of 0.25), Radial border style 1 &  2 .

You can also use the .hidden class to hide any element you want or the .visually-hidden class for elements that need to be invisible to users but exist in the accessibility tree, set floats to left or right using the .float-left and .float-right classes or clear floats using the .clearfix class, which implements the micro clearfix by Nicolas Gallagher. Finally, use the .center-block class to make an element center and display as a block.


Cards Modern content containers

Cards are some of the most modern and stylish content containers and are widely used in many website types. mini.css provides you with the .card class, along with a handful of pre-built styles to help you create beatiful cards for your pages. Note that this module is heavily dependent on the grid system module. To use the cards, simply replace the grid's columns with your cards and you're ready to go. Note that in the examples below, we try to showcase as many features as possible, but there might be something we missed. Also, the .row which acts as the contaienr for the cards has the .cards class applied to it, which helps align the cards horizontally, by automatically shrinking or expanding the spaces between them.

Chubby cat

This is a lovely cat!
03-11-2016, 09:44 PM

Chubby catUploaded Nov, 3rd, 2016

This cat is pretty amazing, right? Just look at it!

Cards are pretty awesome, as you can see.

This is a card with three text sections.

By the way, here's a link to the mini.css project repository on Github, just in case.

You can use <button>s and other similar elements as card sections. Like the button below.

Cards resize automatically to fit any and all content, allowing you to do anything you want with them. They also align the content automatically, so your sections will always look pretty. Nothing to worry about anymore! By the way, this is a .primary card.

.dark heading

Totally normal text.

.primary section text.

Fluid

Yes, .fluid cards are also available! You might want to use these in combination with the grid system's columns to achieve a better effect. There's an example below, after the other size variants for the cards. Have a look.

 Small

There are also .small cards. Tiny, cute, small cards.

 Large


And, of course, there are .large cards.

Because you'll need them.


These cards work quite well together, no matter the size. Well, except the .fluid ones which should be used together, without the other cards. Unless you want a fluid card to act as a separator of sorts, which might be desirable. Just use them in columns, like we show you below, it's the best way. By the way, this was a .double-padded section.

Card 1

This is the first card. It is placed inside a column.

Card 2

This is the second card. It is placed inside a larger column. On smaller displays these will display like a list of cards.

Card 3

This is the third card. It is placed inside a column.

Tabs & accordionsPresent content any way you like

mini.css provides you with a very modern tab component, that can easily be used for multiple things, like tabbed navigation, single collapses, accordion collapses and even image carousels. This might sound like a lot to do with one component, but the design behind it allows it to be truly versatile and replace all those components. To use the tab component, simply create a container using a <div> with the .tabs class. Populate it with <input type="radio">s, each followed by a linked <label> and another <div> which includes the tab's contents. If you want to create an accordion add the .stacked class to the container. The same thing works for collapses as well. Accordions and collapses can also use <input type="checkbox">s instead. Carousels can be created similarly, remember to add images to the inner content <div> and you're good to go. You can see some examples below:


This is some content you can hide and show at will using the above label. Isn't that useful?


Section 1 - The amazing versatility of tabs

Yes, this is still based on tabs. Isn't it wonderful how many things you can accomplish using one simple component?

Section 2 - How accordions work

Accordions are very similar to collapses. Just add multiple <input type="radio">s, along with their content and you are ready to go.


Tab 1

This is the first tab's content.

Tab 2

This is the second tab's content.

Tab 3

This is the third tab's content.

Tab 4

This is the fourth tab's content.



SpinnersLoading with style

Finally, mini.css provides you with a couple of spinner variations, .spinner-dot and .spinner-donut. Simply apply these to a <div> and you are ready to go. Both are showcased below:

This is some text with a .spinner-dot spinner. These spinners are designed with normal paragraphs in mind, so some tweaking of the component itself and/or the way it is presented might be requird. Loading looks like this

And this here is a .spinner-donut spinner. It is more versatile and it can also use a couple of variants like .secondary and .tertiary, as shown below: