About armazon.css

armazon.css is a lightweight and super simple CSS3 Boilerplate Micro Framework built using the LESS CSS Preprocessor that will fit your needs if you consider any of the HTML5 Reset Stylesheets are not enough as they require a lot of tedious 'after-reset' work to restyle every HTML element, and you think CSS Frameworks are too much for your project as they come with a big time consuming documentation and a lot of bloating components that you are probably never going to use.

The basic principle of armazon.css is simplicity, easy to learn with a minimal learning curve and also easy to extend. Its main purpose is to provide an improved CSS basis starting point with a much nicer default CSS style sheet in order to help you speed up the responsive development and design of your web application.

The primary armazon.css features are :

Quick Start

Installation & Getting Started

armazon.css will make a lot easier to kick start your responsive web application and the fastest way to have it up and running on your site is by using the armazon precompiled and minified version, to do so, just follow these simple steps:

  1. Include the armazon.min.css file onto your web document. You have three different options :
    • Install it via bower with the following command : $ bower install armazon.css
    • Using a downloaded copy of armazon.css, you can get the precompiled and minified file from the armazon.css project main repository on GitHub : armazon.min.css @GitHub
    • Or by consuming the hosted file on the CDN kindly provided by rawgit.com : armazon.min.css @RawGit CDN

    <!-- Installed via Bower or using a downloaded copy: -->
    <link rel="stylesheet" type="text/css" href="path/to/your/armazon.min.css" />
    <!-- Using CDN's hosted file: -->
    <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/alterebro/armazon.css/v0.3.1/armazon/armazon.min.css" />
    

  2. Set the viewport meta tag inside the head of your document so you can control how your web app is displayed on mobile devices:

    <meta name="viewport" content="width=device-width, initial-scale=1" />
    
    <!-- You can also add these two optional metatags below -->
    <meta name="HandheldFriendly" content="True" />
    <meta name="MobileOptimized" content="320" />
    
  3. Done, that's all. Now, you can start your development, here's a simple HTML template to help you get started.

To work directly with the armazon source, you may want to use all the development files which are located on the main project repository at GitHub: armazon.css repository @github and probably know more about how to hack and develop with the source files on the next section:

Working with the .less file & Output Customization

Working with the armazon.less file

If you prefer to work with the non compiled .less version of armazon so you can fully customize the CSS output of your styles here's a little guide to help you about how to do it.
Basically you need to have the lessc compiler installed on your computer and include somehow the armazon.less file onto your workflow. ( More info about how to make less work on your machine is available on the lesscss.org website ) Once you have a less-ready environment, you can start to play around with the armazon code :

  1. Working inside the armazon.less file :
    You can create your styles on the same armazon.less file including them just at the bottom of the code, where the following code is located at the end of the file :

    // armazon.css eof
    // --------------------------------------------
    // --------------------------------------------
    // Author's custom styles :
    
    // here you can start writing your css / less rules...
    .rule {
        property : value;
        ...
    }
  2. Working outside the armazon.less file :
    You may also create your own .less style sheet, in that case you'll have to include the armazon less file as follows

    @import 'path/to/your/file/armazon.less';

Output Customization. Setting Up the armazon variables

Either way described above, you'll have access to the armazon defined variables that reside on armazon.less and are located at the top of the file. You can change them and assign them the desired values to fit your needs.
These are the set of available less variables :

Group Variable Name Default Value Definition
Media Queries @armazon-mobile-breakpoint 580 width to filter mobile devices
@armazon-desktop-breakpoint 960 width to fire desktop layout filtering
Margins @armazon-margin 3rem
@armazon-columns-margin 3.5 Amount of percent margin on Grid Columns ( Percentual Value )
@armazon-columns-tablet-margin 2 Percent margin when breaking into Tablet Mode
Colors @armazon-color-background #fafbfc Global Background Color
@armazon-color-foreground #262524 Global Foreground & Text Color
@armazon-color-primary #229def Links and Buttons Color
@armazon-color-neutral #a0a0a0 Neutral Grey

You can assign different values to the following variables that reside on the armazon.less file :

/* --------------------------------------------
// Variables @less
// ----------------------------------------- */
@armazon-mobile-breakpoint  : 580; /* width to filter mobile devices */
@armazon-desktop-breakpoint : 960; /* width to fire desktop layout filtering */

@armazon-margin                 : 3rem;     /* Global margin */
@armazon-columns-margin         : 3.5;      /* Amount of percent margin on Grid Columns ( Percentual Value ) */
@armazon-columns-tablet-margin  : 2;        /* Percent margin when breaking into Tablet Mode */

@armazon-color-background : #fafbfc; /* Global Background Color */
@armazon-color-foreground : #262524; /* Global Foreground & Text Color */
@armazon-color-primary    : #229def; /* Links and Buttons Color */
@armazon-color-neutral    : #a0a0a0; /* Neutral Grey */

Understanding The Grid

The armazon responsive fluid grid system is based on a 6 columns layout that will shrink and resize itself as the browser or device viewport size changes. The size of the margin between columns can be controled on the armazon.less as stated on the previous section, the variable names called @armazon-columns-margin and @armazon-columns-tablet-margin will set the percentage of the viewport assigned to the space between columns.

Adaptive Grid System

The grid works by simply creating a container element with a .row class ( for example a div element: <div class="row"></div> ) and once you have the 'row container' in place, put inside it another element container ( column ) setting a class attribute using the naming convention used in armazon : .column-COLUMN-SIZE

<!-- Two columns, each one is half wide  -->
<div class="row">
	<div class="column-one-half">one-half</div>
	<div class="column-one-half">one-half</div>
</div>
Available column class names
Class NameHTML Code
.column-one-sixth<div class="column-one-sixth">...</div>
.column-one-fourth<div class="column-one-fourth">...</div>
.column-one-third<div class="column-one-third">...</div>
.column-one-half<div class="column-one-half">...</div>
.column-two-thirds<div class="column-two-thirds">...</div>
.column-three-fourths<div class="column-three-fourths">...</div>
.column-five-sixths<div class="column-five-sixths">...</div>

Offsetting

The columns within any 'row container' element inside the grid system may have a left displacement or offset that can be set by adding another class name following the form: shift-SIZE. For instance, if we want to offset a column by one third, we simply add the class name .shift-one-third

<!-- One column, with a 1/3 left offset.  -->
<div class="row">
    <div class="column-one-third shift-one-third">
        ...
    </div>
</div>
Available offset class names
Class Name HTML Code
.shift-one-sixth<div class="shift-one-sixth column-one-sixth">1/6 col w.1/6 shift</div>
.shift-one-fourth<div class="shift-one-fourth column-one-sixth">1/6 col w.1/4 shift</div>
.shift-one-third<div class="shift-one-third column-one-sixth">1/6 col w.1/3 shift</div>
.shift-one-half<div class="shift-one-half column-one-sixth">1/6 col w.1/2 shift</div>
.shift-two-thirds<div class="shift-two-thirds column-one-sixth">1/6 col w.2/3 shift</div>
.shift-three-fourths<div class="shift-three-fourths column-one-sixth">1/6 col w.3/4 shift</div>
.shift-five-sixths<div class="shift-five-sixths column-one-sixth">1/6 col w.5/6 shift</div>

Code Examples

Grid Examples

<!-- armazon grid code examples --> <div class="row"> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> </div> <div class="row"> <div class="column-one-third">one-third</div> <div class="column-two-thirds">two-thirds</div> </div> <div class="row"> <div class="column-one-fourth">one-fourth</div> <div class="column-three-fourths">three fourths</div> </div>
<div class="row"> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-third">one-third</div> </div> <div class="row"> <div class="column-five-sixths">five-sixths</div> <div class="column-one-sixth">one-sixth</div> </div> <div class="row"> <div class="column-one-fourth">one-fourth</div> <div class="column-one-sixth">one-sixth</div> <div class="column-one-third">one-third</div> <div class="column-one-fourth">one-fourth</div> </div>
one-sixth
one-sixth
one-sixth
one-sixth
one-sixth
one-sixth
one-third
two-thirds
one-fourth
three fourths
one-sixth
one-sixth
one-sixth
one-sixth
one-third
five-sixths
one-sixth
one-fourth
one-sixth
one-third
one-fourth

Offset Examples

<div class="row"><div class="column-five-sixths shift-one-sixth">by 1/6</div></div>
<div class="row"><div class="column-three-fourths shift-one-fourth">by 1/4</div></div>
<div class="row"><div class="column-two-thirds shift-one-third">by 1/3</div></div>
<div class="row"><div class="column-one-half shift-one-half">by 1/2</div></div>
<div class="row"><div class="column-one-third shift-two-thirds">by 2/3</div></div>
<div class="row"><div class="column-one-fourth shift-three-fourths">by 3/4</div></div>
<div class="row"><div class="column-one-sixth shift-five-sixths">by 5/6</div></div>
by 1/6
by 1/4
by 1/3
by 1/2
by 2/3
by 3/4
by 5/6

Helper Classes

CSS Classes

Apart of the basic structural grid classes defined on the previous section Understanding The Grid, there's a small set of helper classes :

Class Name Definition
.buttonto style a HTML hyperlink tag <a> and make it look like a button input
.full-width( 100% width )
.max-full-width( 100% maximum width )
.pull-rightfloats content to the right
.pull-leftfloats content to the left
.clearfixSelf Clearing Goodness Hack

Media Query Variables

LESS-Variable Definition
@mobile Default styling, it targets devices with the maximum width defined on the @armazon-mobile-breakpoint variable (580 pixels by default).
You shouldn't ever use this one on a mobile-first approach.
@non-mobile targets devices with a viewport width bigger than the one defined on @armazon-mobile-breakpoint ( 580 by default )
@tablet targets devices with widths between the values defined on @armazon-mobile-breakpoint and @armazon-desktop-breakpoint
( by default that will be < than 960 and > 580 ).
@desktop for devices with a viewport width larger than the defined on the @armazon-desktop-breakpoint variable ( 960 pixels by default )

Those have to be used along the CSS @media rule. The best way to structure the use of media queries on a mobile first approach is to create the queries close to the relevant code (which should be the ones used on mobile devices by default). For example, if you want to change the styles for buttons on big devices, paste the non-mobile query code up in the buttons section and style it there :

.button {
    // Common rules for all media
    color: #c00;
    height: 30px;
    font-size: 14px;

    @media @non-mobile {
        // Targeting non-mobile devices
        height: 40px;
        font-size: 18px;
    }
}

The less media queries are located at the top of the armazon.less. You can modify and extend them as you wish.

@mobile     : ~"all and (max-width: @{armazon-mobile-breakpoint}px)";   // Default
@non-mobile : ~"all and (min-width: @{armazon-mobile-breakpoint}px)";   // Matchs both @tablet and @desktop
@tablet     : ~"all and (min-width: @{armazon-mobile-breakpoint}px) and (max-width: @{armazon-desktop-breakpoint}px)";
@desktop    : ~"all and (min-width: @{armazon-desktop-breakpoint}px)";

HTML Elements : Typography & Text Elements

You don't have to follow any specific pattern when using text semantics elements. armazon.css overrides the default HTML browser styling.

Headings

<!-- Headings -->
        <h1>Header level 1 <strong>Strong</strong></h1>
        <!-- Heading 2nd Level : H2 -->
        <h2>Header level 2. <strong>Strong Text</strong></h2>
        <!-- Heading 3rd Level : H3 -->
        <h3>Header level 3 — <strong>level 3</strong></h3>
        <!-- Heading 4th Level : H4 -->
        <h4>Header level 4 : <strong>header level 4</strong></h4>
        <!-- Heading 5th Level : H5 -->
        <h5>Header level 5 — <strong>Header level 5</strong></h5>
        <!-- Heading 6th Level : H6 -->
        <h6>Header level 6 / <strong>Lorem ipsum dolor</strong></h6>

Header level 1 Strong

Header level 2. Strong Text

Header level 3 — level 3

Header level 4 : header level 4

Header level 5 — Header level 5
Header level 6 / Lorem ipsum dolor

Inline Text Element Semantics

<p>
    Lorem ipsum dolor sit amet, Using mark tag to <mark>highlight text</mark>. Deleted text <del>sample here</del> consectetur
    adipiscing elit <dfn id="def-lorem">definition tag with an id target</dfn>. <a href="http://git.io/armazon">this is a link :
    consectetur adipiscing elit</a>. Duis rhoncus <strong>strong text : nulla ac lacus scelerisque</strong>, at ultrices quam
    convallis. <abbr title="abbr tag with title">Abbr element, praesent sollicitudin with a title</abbr> libero augue,
    <acronym title="acronym tag with title">acronym used fusce feugiat</acronym> vulputate <ins>accumsan pellentesque</ins> neque.
    Etiam quis <em>consequat nisl</em>. Donec <s>ed est fermentum</s>, <a href="#def-lorem">consequat elit at</a>, sodales ante.
</p>
<p>
    Inline <code>code</code>, <kbd>kbd</kbd> tag elements and <samp>samp</samp> text.
    Maecenas <u>mattis</u>. <small>Small text Ut dictum nisl mollis</small>, ut vulputate convallis <sup>sup : pretium lacus</sup>.
    Aenean erat nibh <sub>sub : tellus</sub> mattis eu accumsan eget <code>$_q = (!empty($_GET['q']));</code> diam at cursus.
</p>
<p>
    <abbr title="Too Long; Didn't Read">TLDR</abbr> : consectetur<sub>2</sub> adipiscing elit<sup>3</sup> nisl in,
    <b>vestibulum turpis</b>. Ut <dfn>habitasse</dfn> platea. <mark>Duis vel ipsum scelerisque</mark>, venenatis magna.
    <small>Small text : Donec eget.</small> consequat ligula <strong>Sed dapibus orci</strong>.
    Sed consequat <a href="about://" target="_blank">Aliquam quis velit</a>.
</p>

Lorem ipsum dolor sit amet, Using mark tag to highlight text. Deleted text sample here consectetur adipiscing elit definition tag with an id target. this is a link : consectetur adipiscing elit. Duis rhoncus strong text : nulla ac lacus scelerisque, at ultrices quam convallis. Abbr element, praesent sollicitudin with a title libero augue, acronym used fusce feugiat vulputate accumsan pellentesque neque. Etiam quis consequat nisl. Donec ed est fermentum, consequat elit at, sodales ante.

Inline code, kbd tag elements and samp text. Maecenas mattis. Small text Ut dictum nisl mollis, ut vulputate convallis sup : pretium lacus. Aenean erat nibh sub : tellus mattis eu accumsan eget $_q = (!empty($_GET['q'])); diam at cursus.

TLDR : consectetur2 adipiscing elit3 nisl in, vestibulum turpis. Ut habitasse platea. Duis vel ipsum scelerisque, venenatis magna. Small text : Donec eget. consequat ligula Sed dapibus orci. Sed consequat Aliquam quis velit.

Blockquote Text

<blockquote>
    <p>The Earth provides enough to satisfy every man's need but not for every man's greed.</p>
    <footer> — <cite><a href="https://en.wikipedia.org/wiki/Mahatma_Gandhi">Mahatma Gandhi</a></cite></footer>
</blockquote>

The Earth provides enough to satisfy every man's need but not for every man's greed.

Code Block

<pre><code>This is a code string contained within a pre element
$_ROOT = realpath(dirname(__FILE__)) . '/';
$_QUERY = trim( $_QUERY, '/' );</code></pre>
<pre>pre code block with plain text within it.</pre>
This is a code string contained within a pre element
$_ROOT = realpath(dirname(__FILE__)) . '/';
$_QUERY = trim( $_QUERY, '/' );
pre code block with plain text within it.

Lists

Definition list

<!-- Sample Definition List HTML -->
<dl>
    <dt>Definition Term 01</dt>
    <dd>dd - Definition 01 - a</dd>
    <dd>dd - Definition 01 - b</dd>

    <dt>Definition Term 02</dt>
    <dd>dd - Definition 02</dd>

    <dt>Definition Term 03</dt>
    <dd>dd - Definition 03</dd>
</dl>
Definition Term 01
dd - Definition 01 - a
dd - Definition 01 - b
Definition Term 02
dd - Definition 02
Definition Term 03
dd - Definition 03

Unordered List

<!-- Sample Unordered List HTML -->
<ul>
    <li>List item 01</li>
    <li>List item 02</li>
    <li>List item 03
        <ul>
            <li>Nested list item 01</li>
            <li>Nested list item 02</li>
            <li>Nested list item 03</li>
        </ul>
    </li>
</ul>
  • List item 01
  • List item 02
  • List item 03
    • Nested list item 01
    • Nested list item 02
    • Nested list item 03

Ordered List

<!-- Sample Ordered List HTML -->
<ol>
    <li>List item 01</li>
    <li>List item 02
        <ol>
            <li>Nested list item 01</li>
            <li>Nested list item 02</li>
        </ol>
    </li>
    <li>List item 03</li>
    <li>List item 04</li>
</ol>
  1. List item 01
  2. List item 02
    1. Nested list item 01
    2. Nested list item 02
  3. List item 03
  4. List item 04

Tables

<table>
    <thead><tr><th>Table Header #1</th><th>Table Header #2</th></tr></thead>
    <tbody>
        <tr>
            <td>Sample text ... Donec eget dictum nisl</td>
            <td>Sample text ... Etiam pharetra lorem a lobortis dapibus</td>
        </tr>
        <tr>
            <td>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
            <td>Ut eget massa commodo, venenatis nisl in, vestibulum turpis.</td>
        </tr>
        <tr>
            <td>Donec eget dictum nisl</td>
            <td>Etiam pharetra lorem a lobortis dapibus</td>
        </tr>
        <tr>
            <td>Etiam pharetra lorem a lobortis dapibus</td>
            <td>Donec eget dictum nisl</td>
        </tr>
    </tbody>
    <tfoot><tr><td colspan="2">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td></tr></tfoot>
</table>
Table Header #1 Table Header #2
Sample text ... Donec eget dictum nisl Sample text ... Etiam pharetra lorem a lobortis dapibus
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget massa commodo, venenatis nisl in, vestibulum turpis.
Donec eget dictum nisl Etiam pharetra lorem a lobortis dapibus
Etiam pharetra lorem a lobortis dapibus Donec eget dictum nisl
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Form Elements

Buttons

<button>This is a button</button>
<input type="button" value="input:type:button" />
<input type="reset" value="input:type:reset" />
<input type="submit" value="input:type:submit" />
<p><a href="#" class="button">Link with a .button class</a></p>
<fieldset>
    <legend>Inside a fieldset</legend>
    <div>
        <button disabled="disabled">A disabled button</button>
        <input type="button" disabled="disabled" value="input:button:disable" />
        <input type="submit" disabled="disabled" value="input:submit:disable" />
    </div>
</fieldset>

Link with a .button class

Inside a fieldset

Input Elements

<input type="text" placeholder="input:type:text" />
<input type="date" placeholder="input:date" />
<input type="time" placeholder="input:time" />
<input type="email" placeholder="input:email" />
<input type="number" placeholder="input:number" />
<input type="search" placeholder="input:search" />
<input type="text" placeholder="input:text" />
<input type="tel" placeholder="input:tel" />
<input type="url" placeholder="input:url" />
<input type="password" placeholder="input:password" />

More Elements

<label><input type="checkbox" />   This is a checkbox label</label>
<fieldset>
    <legend>Sample legend</legend>
    <label><input type="radio" name="radio-input" />   A radio input label</label>
    <label><input type="radio" name="radio-input" />   Another radio input label</label>
    <label><input type="radio" name="radio-input" />   Extra radio input label</label>
</fieldset>

<label for="select-input">Select Element</label>
<select id="select-input">
    <optgroup label="Group select : optgroup">
        <option>Select : Option</option>
        <option>Option 1.1</option>
    </optgroup>
    <optgroup label="Group 2">
        <option>Option 2.1</option>
        <option>Option 2.2</option>
    </optgroup>
    <optgroup label="Group 3" disabled>
        <option>Option 3.1</option>
        <option>Option 3.2</option>
        <option>Option 3.3</option>
    </optgroup>
</select>

<label for="textarea-input">Textarea Label</label>
<textarea id="textarea-input" placeholder="textarea placeholder text"></textarea>
Sample legend

Sample Form

<form class="row" action="index.html#forms" method="post">
    <fieldset>
        <legend>Example Legend</legend>
        <h4>Sample Form Title</h4>

        <div class="column-one-third">
            <label for="form-name">Your Name</label>
            <input type="text" id="form-name" placeholder="Your Name Placeholder" />

            <label for="form-email">Your Email</label>
            <input type="email" id="form-email" placeholder="Your Email Placeholder" />

            <label for="form-pass">Password</label>
            <input type="password" id="form-pass" placeholder="Password Placeholder" />
        </div>
        <div class="column-one-third">
            <label for="form-select">Select Gender</label>
            <select id="form-select">
                <option>Male</option>
                <option>Female</option>
            </select>

            <label for="form-comments">Write your Comments</label>
            <textarea id="form-comments" class="full-width max-full-width" rows="8" cols="40" placeholder="Your Cooments Placeholder"></textarea>
        </div>
        <div class="column-one-third">
            <p>
                <label><input type="checkbox" />   Mark this checkbox input</label>
            </p>
            <p>
                <label><input type="radio" name="radio-input" />   This is one option</label>
                <label><input type="radio" name="radio-input" />   Another option</label>
                <label><input type="radio" name="radio-input" />   Extra option</label>
                <label><input type="radio" name="radio-input" />   Different Option</label>
            </p>
            <p>
                <input type="submit" name="form-submit" value="Send Form Data" class="full-width max-full-width" />
            </p>
        </div>
    </fieldset>
</form>
Example Legend

Sample Form Title

Image & Caption

<figure>
    <img src="http://placehold.it/400x200/229def/ffffff?text=armazon.css" />
    <figcation>
        Placeholder image caption on a figcation tag
    </figcation>
</figure>
Placeholder image caption on a figcation tag