## Getting started

You can get started using mini.css in one of many ways. It is published on npm and yarn, so you can easily download it, using your preferred package manager:

    npm install mini.css

    yarn add mini.css

Alternatively, you can use either rawgit or cdnjs to import mini.css into your HTML page's `<head>` tag:

    <link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v3.0.0-alpha.1/dist/mini-default.min.css">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mini.css/v3.0.0-alpha.1/mini-default.min.css">

After adding mini.css to your project, remember to also add the following line inside your HTML page's `<head>` tag to utilize the viewport meta tag:

    <meta name="viewport" content="width=device-width, initial-scale=1">

mini.css is crafted with long-term support in mind, so expect it to be compatible with all modern browsers, as well as their future versions. However, most legacy and proxy browsers, such as Internet Explorer, Opera Mini, IE Mobile and UC Browser are not officially supported, meaning certain features may not be displayed properly or behave exactly as expected.

### Edge15

### Firefox31

### Chrome49

### Safari9.1

### Opera36

### Android56

Browser versions officially supported

## Common textual elements

mini.css utilizes the ruleset of Normalize.css v7.0.0 to reliably deal with inconsistencies between browsers, ensuring that your web apps will look beatiful no matter on what browser or device you're at. On top of these rules, we have applied some tasteful rules, such as using native font stack to figure out the best font for each device, slightly altering the background and foreground colors, as well as setting the size of the text to `16px` and its line height to `1.5`.

All of the most common HTML5 elements, such as paragraphs, links, bold, small and slanted text, have been styled by default using clean, modern typography to make your pages look cool and stand out from the rest of the internet.

### Example

This is a paragraph with some sample text. Did you know that the latest version of mini.css is codenamed Gluon? Well, now you do!

Remember that mini.css is totally free, no fine print involved!

### Sample code

    <p>This is a paragraph. with some <strong>bold text</strong> and some <em>italics text</em>.</p>
    <a href="#">This is a link.</a>
    <small>This is some small text.</small>
    <sub>Subscript</sub>
    <sup>Superscript</sup>
    <hr/>

### Best practices

    /* Do not do this (use Sass instead) */
    html {
      font-size: 14px;
    }

Don't: Avoid altering the base font size of `16px` directly in your CSS code, as it can cause problems with the display of certain elements.

### Customization

- Text color can be changed globally by changing the value of the `--fore-color` variable.
- Background color can be changed globally by changing the value of the `--back-color` variable.
- Border color can be changed globally by changing the value of the `--border-color` variable. This affects the color of `<hr>` elements.
- Universal margin for elements can be changed globally by changing the value of the `--universal-margin` variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.
- Universal padding for elements can be changed globally by changing the value of the `--universal-padding` variable.
- You can change the color of links by changing the values of the `--a-link-color` and `--a-visited-color` variables.

## Headings

All of the HTML5 heading elements are styled, using a customizable ratio and simple rules, providing a clean base for your web app's titles. Apart from the headings themselves, customized rules are provided for displaying subheadings or explanatory text below your web app's headings.

### Example

# Heading 1Subheading

## Heading 2Subheading

### Heading 3Subheading

#### Heading 4Subheading

##### Heading 5Subheading

###### Heading 6Subheading

### Sample code

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

### Customization

- Text color can be changed globally by changing the value of the `--fore-color` variable. This will affect the color of the headings' main text.
- Secondary text color can be changed globally by changing the value of the `--secondary-fore-color` variable. This will affect the color of subheadings.
- Universal margin for elements can be changed globally by changing the value of the `--universal-margin` variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.
- You can change the ratio of headings' size by chaning the value of the `--heading-ratio` variable. Bear in mind that the value of this variable must be unitless to work properly.

## Images & captions

Image elements are responsive by default, without the need for any special classes or anything similar. They automatically scale down as necessary to display properly on smaller devices, while retaining their original aspect ratio, while they will never scale above their original size.

If you want to add captions to images, you can use HTML5 figure elements, along with their related captions.

### Example

Image caption

### Sample code

    <img src="image.png" alt="Image description"/>

    <figure>
      <img src="image.png" alt="Image description"/>
      <figcaption>Image caption</figcaption>
    </figure>

### Notes

- While not mandatory, it is considered a good practice to always add a `alt` attribute to image elements on your web apps.

### Customization

- You can change the text color of `<figcaption>` elements by changing the value of the `--secondary-fore-color` variable.
- Universal margin for elements can be changed globally by changing the value of the `--universal-margin` variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.

## Lists

List elements, both unordered and ordered, are minimally styled to match with the rest of the framework's aesthetics. Their margins and padding are reset to properly align with the rest of the common HTML5 elements, providing a stable foundation for all of your web app's lists.

### Example

- Apple
- Orange
- Strawberry

1. Wake up
2. Eat breakfast
3. Go to work

### Sample code

    <ul>
      <li>Apple</li>
      <li>Orange</li>
      <li>Strawberry</li>
    </ul>
    <ol>
      <li>Wake up</li>
      <li>Eat breakfast</li>
      <li>Go to work</li>
    </ol>

### Customization

- Text color can be changed globally by changing the value of the `--fore-color` variable.
- Background color can be changed globally by changing the value of the `--back-color` variable.
- Universal margin for elements can be changed globally by changing the value of the `--universal-margin` variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.
- Universal padding for elements can be changed globally by changing the value of the `--universal-padding` variable.

## Code & quotations

Code blocks and quotation elements are styled using custom rules that help make them stand out from the rest of the text, while inline code and keyboard input tags are styled in a similar manner, while aiming not to break the flow of regular text.

### Example

This is some text with some inline `source code` and some keyboard `input`.

    function sum(num1, num2){
      return num1 + num2;
    }

> This is some text quoted from elsewhere.

### Sample code

    <p>This is some text with some inline <code>source code</code> and some keyboard <kbd>input</kbd>.</p>
    <pre>function sum(num1, num2){
      return num1 + num2;
    }</pre>
    <blockquote cite="www.quotation.source">This is some text quoted from elsewhere.</blockquote>

### Notes

- The `cite` attribute of `<blockquote>` elements is not mandatory and can be omitted. The element's sizing will be automatically adjusted according to the presence of the `cite` attribute.

### Customization

- Text color can be changed globally by changing the value of the `--fore-color` variable. This will affect the text color of `<code>` and `<pre>` elements and background color of `<kbd>` elements.
- Background color can be changed globally by changing the value of the `--back-color` variable. This will affect the background color of `<blockquote>` elements and text color of `<kbd>`.
- You can change the background color of `<code>` and `<pre>` elements by changing the value of the `--secondary-back-color` variable.
- You can change the text color of `<blockquote>` elements by changing the value of the `--secondary-fore-color` variable.
- You can change the border color of `<pre>` and `<blockquote>` elements by changing the value of the `--secondary-border-color` variable.
- You can change the border color of the left border of `<pre>` elements by changing the value of the `--pre-color` variable.
- You can change the border color of the left border of `<blockquote>` elements by changing the value of the `--blockquote-color` variable.
- Universal margin for elements can be changed globally by changing the value of the `--universal-margin` variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.
- Universal padding for elements can be changed globally by changing the value of the `--universal-padding` variable.
- Universal border radius for elements can be changed globally by changing the value of the `--universal-border-radius` variable.