Base

Leveraging Normalize.css, an HTML5-ready alternative to CSS resets.

The Foundation

All modules in Pure build on top of Normalize.css. It's our foundational layer to maintain some degree of cross-browser consistency. We use Normalize v1.x because it supports older versions of Internet Explorer. We like Normalize so much that we put it on our CDN. You can pull in Normalize.css by adding this <link> element on your page:

<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/base-min.css">

A bit about Normalize.css

Normalize.css is an open-source project by Nicolas Gallagher and Jonathan Neal. In their own words:

Normalize.css is a small CSS file that provides better cross-browser consistency in the default styling of HTML elements. It’s a modern, HTML5-ready, alternative to the traditional CSS reset."

Normalize.css comes with great documentation and a thorough guide explaining how it differs from a traditional reset. You can also check out YUI's CSSNormalize module, which includes the generic Normalize along with a contextual version. The contextual version of Normalize only applies normalized styles to elements that are children of an element with the class name yui3-normalized.

Typography

To keep Pure lean and extensible, we do not add any typographic styles over the foundational layer provided by Normalize. This means that you get headings with different sizes, blockquotes, lists, definition lists, and more, but their styles are minimal and easy to override.

Headings

Headings run from 1 to 6 in decreasing size. Font sizes are defined in em.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lists

Lists come in different forms. There are unordered lists, ordered lists, and definition lists. Normalize provides basic styling and cross-browser consistency for these lists. You can style these further in your specific application. If you're looking to use lists to make menus, check out Menu CSS.

Unordered List

  • list item 1
  • list item 1
    • list item 2
    • list item 2
      • list item 3
      • list item 3
    • list item 2
    • list item 2
  • list item 1
  • list item 1

Ordered List

  1. list item 1
  2. list item 1
    1. list item 2
    2. list item 2
      1. list item 3
      2. list item 3
    3. list item 2
    4. list item 2
  3. list item 1
  4. list item 1

Definition Lists

Definition term
Definition description
Definition term
Definition description
Definition description
Definition term
Definition term
Definition description

Blockquotes

Blockquotes encompass text that is meant to represent a quotation. By default, blockquotes look like regular text, except that they are indented. This gives you the freedom to set your own styles on top. Here's a default one:

One small step for man, one giant leap for mankind.
<blockquote>
    One small step for man, one giant leap for mankind.
</blockquote>

Taking advantage of the lack of default styles, we've customized the blockquotes on this site to look a little different. We encourage you to do the same based on how your site looks.

One small step for man, one giant leap for mankind.

Abbreviations

The <abbr> represents an abbreviation. If a title attribute is provided, it'll show up on hover. Abbreviations generally have a small dotted underline.

YUI is a free, open source JavaScript and CSS library for building richly interactive web applications.

<p>
    <abbr title="Yahoo User Interface">YUI</abbr> is a free, open source JavaScript and CSS library for building richly interactive web applications.
</p>

Addresses

The <address> is used to reference contact information. By default, addresses have no specific styling. However, they can be styled using the various inline styles available through Normalize.

Tilo Mitra
Eric Ferraiuolo
Matt Sweeney
Jeff Conniff
<address>
    <a href="https://github.com/tilomitra">Tilo Mitra</a><br>
    <a href="https://github.com/ericf">Eric Ferraiuolo</a><br>
    <a href="https://github.com/msweeney">Matt Sweeney</a><br>
    <a href="https://github.com/jconniff">Jeff Conniff</a><br>
</address>

Inline Styles

There are numerous other inline styles that can be used. Here's a quick list from the Normalize documentation:

cite element example
The code element example
The del element example
The dfn element and dfn element with title examples
The em element example
The i element example
The img element example
The ins element example
The kbd element example
The mark element example

The q element inside a q element example
The s element example
The samp element example
The small element example
The span element example
The strong element example
The sub element example
The sup element example
The u element example
The var element example

Moving beyond Normalize

Normalize.css is a great starting place for your project, but some HTML elements such as forms, tables, and menus require more styling than what's provided by Normalize.

We made a more opinionated look and feel for these elements, while keeping them minimal enough so that you can customize them for your site or app's needs. Check out our CSS for Forms, Tables, and Menus.