The Automile grid system uses Flexbox and defaults to equal width, and height, columns. Put as many .cols as you wish in your .rows and the .cols will automatically space out evenly. Extend .col with any of the helper width classes available to create custom layouts.
If you extend a .row with .row--collapsed all columns will collapse (no column gap).
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
<style>.bgr{background-color:papayawhip;height:20px;}</style><divclass="row"><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div></div><br><divclass="row"><divclass="col col--two-thirds"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div></div><br><divclass="row"><divclass="col"><divclass="bgr">Foo</div></div><divclass="col col--three-fifths"><divclass="bgr">Foo</div></div><divclass="col col--one-quarter"><divclass="bgr">Foo</div></div></div><br><divclass="row"><divclass="col col--one-third"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div></div><br><!-- No column gap between these --><divclass="row row--collapsed"><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div><divclass="col"><divclass="bgr">Foo</div></div></div>
Row Alignments
The default is equal height on columns, but you can turn this off and align all .cols vertically.
Sometimes you just want to throw a bunch of divs into a row and have them line up nicely. Maybe you don’t know how many items you have? Extend your .row with row--wrap.
For example, these are all the icons Interior ships with.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque hic iste ipsa perspiciatis quae, adipisci nam aperiam nesciunt ducimus sit labore nostrum aspernatur, dolorum sequi inventore laborum odio laboriosam molestias.
Maxime atque, explicabo earum veniam esse mollitia dolore, suscipit nemo reprehenderit recusandae obcaecati alias repellat amet doloribus neque, iste necessitatibus dolorum minus.
Lorem ipsum dolor sit amet, consectetur.
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque hic iste ipsa perspiciatis quae, adipisci nam aperiam nesciunt ducimus sit labore nostrum aspernatur, dolorum sequi inventore laborum odio laboriosam molestias.</p><p>Maxime atque, explicabo earum veniam esse mollitia dolore, suscipit nemo reprehenderit recusandae obcaecati alias repellat amet doloribus neque, iste necessitatibus dolorum minus.</p><p>Lorem ipsum dolor sit amet, consectetur.</p>
Small Text
This line of text is meant to be treated as fine print.
<p><small>This line of text is meant to be treated as fine print.</small></p>
Bold & Italics
For emphasizing a snippet of text with a heavier font-weight or italics.
The following snippet of text is rendered as bold text.
The following snippet of text is rendered as italicized text.
<p>The following snippet of text is <strong>rendered as bold text</strong>.</p><p>The following snippet of text is <em>rendered as italicized text</em>.</p>
Alignment Classes
Realign text to components with text alignment classes.
For quoting blocks of content from another source within your document.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet consectetur fugit et ipsam officiis enim reiciendis natus vel expedita maxime? Numquam fugiat aliquid, praesentium illum veritatis asperiores expedita dolore dicta.
<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet consectetur fugit et ipsam officiis enim reiciendis natus vel expedita maxime? Numquam fugiat aliquid, praesentium illum veritatis asperiores expedita dolore dicta.</p></blockquote>
A list of items in which the order does not explicitly matter.
Lorem ipsum dolor sit amet
Consectetur adipiscing elit
Integer molestie lorem at massa
Facilisis in pretium nisl aliquet
Nulla volutpat aliquam velit
Phasellus iaculis neque
Purus sodales ultricies
Vestibulum laoreet porttitor sem
Ac tristique libero volutpat at
Faucibus porta lacus fringilla vel
Aenean sit amet erat nunc
Eget porttitor lorem
<ul><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit
<ul><li>Phasellus iaculis neque</li><li>Purus sodales ultricies</li><li>Vestibulum laoreet porttitor sem</li><li>Ac tristique libero volutpat at</li></ul></li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul>
Ordered
A list of items in which the order does explicitly matter.
Lorem ipsum dolor sit amet
Consectetur adipiscing elit
Integer molestie lorem at massa
Facilisis in pretium nisl aliquet
Nulla volutpat aliquam velit
Faucibus porta lacus fringilla vel
Aenean sit amet erat nunc
Eget porttitor lorem
<ol><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit</li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ol>
Bare
The list-bare object removes any indents and bullet points from lists. (immediate children only).
Lorem ipsum dolor sit amet
Consectetur adipiscing elit
Integer molestie lorem at massa
Facilisis in pretium nisl aliquet
Nulla volutpat aliquam velit
Phasellus iaculis neque
Purus sodales ultricies
Vestibulum laoreet porttitor sem
Ac tristique libero volutpat at
Faucibus porta lacus fringilla vel
Aenean sit amet erat nunc
Eget porttitor lorem
<ulclass="list-bare"><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit
<ul><li>Phasellus iaculis neque</li><li>Purus sodales ultricies</li><li>Vestibulum laoreet porttitor sem</li><li>Ac tristique libero volutpat at</li></ul></li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul>
Horizontal
The list-horizontal throws the list into horizontal mode.
Faucibus porta lacus fringilla vel
Aenean sit amet erat nunc
Eget porttitor lorem
<ulclass="list-horizontal"><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul>
Block
The list-horizontal throws the list into horizontal mode.
Faucibus porta lacus fringilla vel
Aenean sit amet erat nunc
Eget porttitor lorem
<ulclass="list-block"><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul>
Split
Simple split item for creating two elements floated away from one another.
Burger and fries
£5.99
Fillet steak
£19.99
Ice cream
£2.99
<dlclass="list-split"><dtclass="list-split__title">Burger and fries</dt><dd>£5.99</dd><dtclass="list-split__title">Fillet steak</dt><dd>£19.99</dd><dtclass="list-split__title">Ice cream</dt><dd>£2.99</dd></dl>
Each td will use as much space as needed in your table. But we also ship a bunch of helper classes to style the widths of tds independantly. Read more about the helper width classes.
All textual <input>, <textarea> elements with .form-control are set to width: 100%; by default. <select> needs a wrapper div with .select to function properly. Checkboxes and radios gets their styling from the wrapping .control class.
Add .push--bottom classes for needed spacing.
Example
<form><labelclass="label"for="exampleEmail">Email address</label><inputclass="form-control push--bottom"type="email"id="exampleEmail"placeholder="Email"><labelclass="label"for="disabledInput">Disabled Input</label><inputclass="form-control push--bottom"type="text"id="disabledInput"placeholder="Disabled Input"disabled><labelclass="label"for="examplePassword">Password</label><inputclass="form-control push--bottom"type="password"id="examplePassword"placeholder="Password"><labelclass="label"for="exampleNoChrome">No Chrome</label><inputclass="form-control form-control--no-chrome push--bottom"type="text"id="exampleNoChrome"placeholder="This input has no chrome"><divclass="push--bottom"><labelclass="control checkbox"><inputtype="checkbox"><spanclass="control-indicator"></span> Check this custom checkbox
</label><labelclass="control checkbox"><inputtype="checkbox"disabled><spanclass="control-indicator"></span> This checkbox is disabled
</label></div><divclass="select push--bottom"><selectaria-label="Select menu example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select></div><labelclass="label"for="exampleTextarea">Message</label><textareaclass="form-control push--bottom"id="exampleTextarea"rows="4"></textarea><divclass="push--bottom"><labelclass="control radio"><inputname="radio"type="radio"><spanclass="control-indicator"></span> Toggle this custom radio input
</label><labelclass="control radio"><inputname="radio"type="radio"><spanclass="control-indicator"></span> Or toggle this other custom radio input
</label></div><buttontype="submit"class="button">Submit</button></form>
Different Selects
<divclass="push--bottom"><divclass="select"><selectaria-label="Select menu example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select></div></div><divclass="select select--no-chrome"><selectaria-label="Select menu example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Lorem ipsum dolor sit amet, consectetur adipisicing elit. In, dicta.</option><optionvalue="3">Three</option></select></div>
Inputs With Icons
km
<labelclass="label"for="dateExample">Date picker</label><divclass="row"><divclass="form-control--icon"><svgclass="shape"aria-hidden="true"><usexlink:href="#shape-calendar"></use></svg></div><inputtype="text"class="form-control"id="dateExample"placeholder="Pick a date…"></div><br><labelclass="label"for="odometerExample">Odometer</label><divclass="row"><inputtype="text"class="form-control"id="odometerExample"placeholder="Enter Odometer"><divclass="form-control--icon">
km
</div></div>
Validation States
This value should be a valid email.
This value is required.
km
This value is required.
<labelclass="label"for="email">Email address</label><inputtype="email"class="form-control form-control--error"id="email"placeholder="Enter email"value="david@automile"><divclass="form-control--error-message">This value should be a valid email.</div><br><labelclass="label"for="message">Your message</label><textareaclass="form-control form-control--error"id="message"cols="30"rows="6"placeholder="Enter message"></textarea><divclass="form-control--error-message">This value is required.</div><br><labelclass="label"for="odometerExample">Odometer</label><divclass="row"><inputtype="text"class="form-control form-control--error"id="odometerExample"placeholder="Enter Odometer"><divclass="form-control--icon form-control--error">
km
</div></div><divclass="form-control--error-message">This value is required.</div>
Column Sizing
Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.
For cross browser styling, it’s recommended to use the button element rather than styling an anchor tag as a button. If it should look like a button, it probarbly is.
<buttonclass="button">A button</button><ahref="#"class="button"role="button">A link button</a><buttonclass="button">
A button with an icon
<svgclass="shape"aria-hidden="true"><usexlink:href="#shape-vehicles"></use></svg></button>
<buttonclass="button button--small">A small button</button><ahref="#"class="button button--small"role="button">A small button</a><buttonclass="button button--small">
A small button with an icon
<svgclass="shape"aria-hidden="true"><usexlink:href="#shape-vehicles"></use></svg></button>
Narrow buttons
Narrow buttons decrease the amount of padding on each side of the button.
<buttonclass="button button--narrow">A narrow button</button><ahref="#"class="button button--narrow"role="button">A narrow button</a><buttonclass="button button--narrow">
A narrow small button with an icon
<svgclass="shape"aria-hidden="true"><usexlink:href="#shape-vehicles"></use></svg></button>
<buttonclass="button button--block">A block button</button><ahref="#"class="button button--block"role="button">A block link button</a><buttonclass="button button--block">
A block button with an icon
<svgclass="shape"aria-hidden="true"><usexlink:href="#shape-vehicles"></use></svg></button>
<divclass="button-group"><aclass="button button--hollow"href="#">Dropdown</a><buttonclass="button button--hollow button--narrow split-button-example-target"><svgclass="shape"aria-hidden="true"><usexlink:href="#shape-caret-down"></use></svg></button></div><divclass="split-button-example-content"style="display: none;"><ulclass="drop-menu"><liclass="drop-menu__heading"role="heading">Lorem</li><li><ahref="#">Lorem ipsum</a></li><li><ahref="#">Nisi deleniti</a></li><li><ahref="#">Dicta dolor</a></li><liclass="drop-menu__divider"role="separator"></li><liclass="drop-menu__heading"role="heading">Ipsum</li><li><ahref="#">Soluta est</a></li></ul></div><script>(function(){'use strict';// Click on this el triggers the drop.vardropTarget=document.querySelector('.split-button-example-target');// What should we show in the drop?vardropContent=document.querySelector('.split-button-example-content');// Init drop.vardrop=newDrop({target:dropTarget,content:dropContent.innerHTML});})();</script>
A series of helper classes to use arbitrarily. A lot of these classes carry !important as you will always want them to win out over other selectors.
Add/remove Floats
.float-none
.float-right
.float-left
Force element to new row i.e. clear any float.
<divclass="float-none">.float-none</div><divclass="float-right">.float-right</div><divclass="float-left">.float-left</div><divclass="clear">Force element to new row i.e. <em>clear</em> any float.</div>