Add the stylesheet to your project and begin writing the HTML for your app.
<link rel="stylesheet" href="uptown.css">
Source Dependencies
The framework is a single file that imports .scss files for each component.
SASS + Autoprefixer
Uptown CSS is built using SASS and the Autoprefixer plugin for powerful
vendor prefixing.
Autoprefixer is awesome and eliminates the need for
constantly checking Can I Use for cross-browser compatibility.
No JavaScript. None. Zero. Zilch.
There are no JavaScript dependencies. You're free to use any library since Uptown CSS is JS agnostic.
Developed By
Author
I'm Ryan O'Donnell, co-founder over at ShopPad and Mesa.
Thousands of Shopify stores use apps from ShopPad
and many of them are powered by Uptown CSS. Uptown is a framework has been battle-tested and is 100% production ready. Now we've open sourced it to share with Shopify's awesome developer community.
The grid is a 12-column fluid grid with a max width of 1036px, that shrinks with the browser/device at smaller sizes.
twelve
one
eleven
two
ten
three
nine
four
eight
five
seven
six
six
one-half
one-half
two-thirds
one-third
Source
<!-- This is a single, full-width element --><article><divclass="column twelve"><p>twelve</p></div></article><!-- Just use a number and class 'column' or 'columns' --><article><divclass="columns two"><p>two</p></div><divclass="columns ten"><p>ten</p></div></article><!-- There are a few shorthand classes available too --><article><divclass="column one-half"><p>one-half</p></div><divclass="column one-half"><p>one-half</p></div></article><article><divclass="column two-thirds"><p>two-thirds</p></div><divclass="column one-third"><p>one-third</p></div></article>
Cards
This element is the canvas to put your app content within.
Card
Source
<article><divclass="card">
Card
</div></article>
Cards with sections
Add the class .has-sections to the .card element then just add .card-section elements with dividing <hr> tags.
The class .secondary can be added to any .card to visually dimm that element.
Card
This card is slightly dimmed to give the primary card more visual importance
Source
<article><divclass="columns eight card"><p>Card</p></div><divclass="columns four card secondary"><p>This card is slightly dimmed to give the primary card more visual importance</p></div></article>
Typography
Type is defined with rems, so font-sizes and spacial relationships can be responsively sized based on a single font-size property. All measurements are base 10 so an H1 with 4.0rem font-size just means 40px. The typography base is device driven; "San Francisco" for Apple devices and "Roboto", "Segoe UI" for Android device. "Helvetica Neue" is the fallback. Size is set at 1.4rem (14px). Other type basics like anchors, strong, emphasis, and underline are all included.
<h1>h1 Heading</h1><h2>h2 Heading</h2><h3>h3 Heading</h3><h4>h4 Heading</h4><h5>h5 Heading</h5><h6>h6 Heading</h6><p>Paragraph text</p><a>Anchor</a><strong>Bold</strong><u>Underline</u><pre>Preformatted text</pre><code>Code</code><ul><li>Unordered list item</li><li>Unordered list item
<ul><li>Unordered list item</li><li>Unordered list item</li><li>Unordered list item</li></ul></li><li>Unordered list item</li></ul><ol><li>Ordered list item</li><li>Unordered list item
<ol><li>Unordered list item</li><li>Unordered list item</li><li>Unordered list item</li></ol></li><li>Ordered list item</li></ol>
Icons
Familiar icons are available and can be used on their own or within other elements.
Add a class .tip to any element. Add the tip's text as a data-hover attribute. The hover event will automatically pull the text without any JavaScript needed.
<aclass="tip"href="#"data-hover="You found me!"><buttonclass="tip"data-hover="You rebel">Hover Me</button>
Alerts
The container element needs a class .alert. Add .notice, .success, .warning, .notification or .error for the desired icon and color. The <dl> element is for the title and description text. Adding a .close element or <button> elements are optional.
General Alert
General Alert with Close
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis leo purus, rhoncus id ultrices vitae, feugiat non neque.
General Alert with Button
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis leo purus, rhoncus id ultrices vitae. Learn More
Notice Alert
Lorem ipsum dolor sit amet, consectetur adipiscing elit leo purus, rhoncus id ultrices vitae.
Success Alert
Lorem ipsum dolor sit amet, consectetur adipiscing elit leo purus, rhoncus id ultrices vitae.
Warning Alert
Lorem ipsum dolor sit amet, consectetur adipiscing elit leo purus, rhoncus id ultrices vitae.
Notification Alert
Lorem ipsum dolor sit amet, consectetur adipiscing elit leo purus, rhoncus id ultrices vitae.
Error Alert
Lorem ipsum dolor sit amet, consectetur adipiscing elit leo purus, rhoncus id ultrices vitae.
<divclass="alert"><dl><dt>General Alert</dt></dl></div><divclass="alert"><aclass="close"href="#"></a><dl><dt>General Alert with Close</dt><dd>...</dd></dl></div><divclass="alert"><dl><dt>General Alert with Button</dt><dd>... <ahref="#">Learn More</a></dd></dl><button>Change</button></div><divclass="alert notice"><dl><dt>Notice Alert</dt><dd>...</dd></dl></div><divclass="alert success"><dl><dt>Success Alert</dt><dd>...</dd></dl></div><divclass="alert warning"><dl><dt>Warning Alert</dt><dd>...</dd></dl></div><divclass="alert notification"><dl><dt>Notification Alert</dt><dd>...</dd></dl></div><divclass="alert error"><dl><dt>Error Alert</dt><dd>...</dd></dl></div>
Tables
Default <table> containing various types of content. Add a container wrapper with a class .overflow-container if the table needs to be scrollable on smaller screens.
<table><thead><tr><thcolspan="2">Product</th><th>Status</th><th>Action</th></tr></thead><tbody><tr><td><ahref="#"><imgwidth="35"height="35"alt=""src="images/image-none.svg"></a></td><td><ahref="#">Some Product</a></td><td></td><td><buttonclass="secondary icon-trash"></button></td></tr><tr><td><ahref="#"><imgwidth="35"height="35"alt=""src="images/image-none.svg"></a></td><td><ahref="#">Another Product</a></td><td><ul><li>This product has no images.</li><li>This product has no description.</li><li>This product must be at least $0.01.</li></ul></td><td></td></tr><tr><td><ahref="#"><imgwidth="35"height="35"alt=""src="images/image-none.svg"></a></td><td><ahref="#">One More Product</a></td><td><ul><li>This product must be at least $0.01.</li></ul></td><td></td></tr></tbody></table>
Table with tags & buttons
Default <table> element showing buttons and tags elements.
<tableclass="results"><thead><tr><th>Product</th><th>Inventory</th><th>Type</th></tr></thead><tbody><tr><td>Adidas Running Show</td><td><spanclass="highlight-warning">5</span> in stock</td><td>Shoe</td></tr><tr><td>New Balance Running Show</td><td><spanclass="highlight-warning">12</span> in stock</td><td>Shoe</td></tr><tr><td>New Balance Running Show</td><td>60 in stock for 5 variants</td><td>Shoe</td></tr></tbody></table>
Summary Report
Add .summary to a <table> element for this specific layout.
Add the class .pending to display a clock icon to represent a "pending" state.
greenyellowredgreyorangeblue
<spanclass="tag green pending">green</span><spanclass="tag yellow pending">yellow</span><spanclass="tag red pending">red</span><spanclass="tag grey pending">grey</span><spanclass="tag orange pending">orange</span><spanclass="tag blue pending">blue</span>
Removable Tags
Primarily used with content not associated with forms.
green yellow red grey orange blue
<spanclass="tag green remove">green <ahref="#"></a></span><spanclass="tag yellow remove">yellow <ahref="#"></a></span><spanclass="tag red remove">red <ahref="#"></a></span><spanclass="tag grey remove">grey <ahref="#"></a></span><spanclass="tag orange remove">orange <ahref="#"></a></span><spanclass="tag blue remove">blue <ahref="#"></a></span>
Tabs
Use a <ul> with the class .tabs directly after an element with the .has-sections class.