A lightweight HTML & CSS base layer for mobile-first web development
Download ChassisYou're set with this 2 unit grid for mobile and 12 unit grid for desktop.
Creating a simple grid is easy. For mobile grids, use .units-*
to specify the number of units that make up your column. If you want to take advantage of the twelve unit grid on desktops, use .lg-units-*
. Wrapping your columns in the .column-group
class guarantees clearing.
For mobile, each row is composed of a total of two units. For desktops, each row is made up of twelve units.
<!-- Mobile: Two single unit columns --> <!-- Desktop: A five unit column and a seven unit column --> <div class="container"> <div class="column-group"> <div class="column units-1 lg-units-5">…</div> <div class="column units-1 lg-units-7">…</div> </div> </div>
You can also offset columns using .offset-1
on mobile and .lg-offset-*
on desktop screens.
<!-- Mobile: One single unit column offset by one--> <!-- Desktop: Ten unit column offset by two --> <div class="container"> <div class="column-group"> <div class="column units-1 lg-units-10 offset-1 lg-offset-2">…</div> </div> </div>
Chassis sets you up with basic headings, paragraphs, and blockquotes.
Use headings to title and give hierarchy to your content. Chassis gives you six heading sizes to choose from. <h1>
through <h6>
.
<h1>Heading 1</h1> <!-- 50px --> <h2>Heading 2</h2> <!-- 40px --> <h3>Heading 3</h3> <!-- 32px --> <h4>Heading 4</h4> <!-- 22px --> <h5>Heading 5</h5> <!-- 18px --> <h6>Heading 6</h6> <!-- 14px -->
The default paragraph font-size
for body copy is 18px with a unit-less line-height
of 1.5.
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.</p>
Use a <blockquote>
to call out quoted text and give credit to the author.
This is my block quote. There are many like it, but this one is mine.
Connor Sears, Creator of Chassis
<blockquote> <p>This is my block quote. There are many like it, but this one is mine.</p> <small>Connor Sears, Creator of Chassis</small> </blockquote>
Adding a <form>
allows you to gather data directly from your users.
<form> <input type="text" placeholder="Your name"> <input type="search" placeholder="Search"> <textarea rows="5"></textarea> <select> <option>…</option> <option>…</option> <option>…</option> </select> <label> <input type="checkbox" value="Check 1"> <span>Here's a checkbox</span> </label> … <label> <input type="radio" name="radio-group" value="Radio 1"> <span>Choose this option</span> </label> … <button type="submit" class="button">Submit</button> </form>
If you need to display tabular data, using a <table>
is your best option.
First name | Last name | Company |
---|---|---|
Connor | Sears | GitHub |
Mark | Otto | GitHub |
Dave | Gamache | Medium |
<table> <thead> <tr> <th>First Name</th> <th>Last Name</th> <th>Comapany</th> </tr> </thead> <tbody> <tr> <td>Connor</td> <td>Sears</td> <td>Pinterest</td> </tr> … </tbody> </table>
The Entypo icon font by Daniel Bruce is included as the default icon set for Chassis. There are over 200 icons to choose from.
Use an icon by adding the corresponding class to <i class="icon icon-phone"></i>
. The icon's size is determined by the parent element.