Grids

Grid systems are used for creating responsive page layouts through a series of rows and columns that house your content. Here's how the Limestone grid system works:

  • Rows must be placed within a .container-fluid for proper alignment and padding.
  • Use rows to create horizontal groups of columns.
  • Content should be placed within columns, and only columns may be immediate children of rows.
  • Predefined grid classes like .row and .col-xs-4 are available for quickly making grid layouts.
  • Columns create gutters (gaps between column content) via padding. That padding is offset in rows for the first and last column via negative margin on .rows.
  • Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three .col-xs-4.

Look to the examples for applying these principles to your code.

Grid options

See how aspects of the Limestone grid system work across multiple devices with a handy table.

Extra small devices
Phones
Small devices
Some phones / Tablets
Medium devices
Some tablets/Desktops
Large devices
Desktops
Grid behavior Horizontal at all times Collapsed to start, horizontal above breakpoints
Class prefix .col-xs- .col-sm- .col-md- .col-lg-

Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any .col-md- class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg- class is not present.

Example: Stacked-to-horizontal

Using a single set of .col-md-* grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any .row.

.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-8
.col-md-4
.col-md-4
.col-md-4
.col-md-4
.col-md-6
.col-md-6
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-8
.col-md-4
.col-md-4
.col-md-4
.col-md-4
.col-md-6
.col-md-6

Example: Mobile and desktop

Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding .col-xs-* .col-md-* to your columns. See the example below for a better idea of how it all works.

.col-xs-12 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6
.col-xs-6
.col-xs-12 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6
.col-xs-6

Example: Mobile, tablet, desktops

Build on the previous example by creating even more dynamic and powerful layouts with tablet .col-sm-* classes.

.col-xs-12 .col-sm-6 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4
.col-xs-12 .col-sm-6 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4

Responsive column resets

With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a .clearfix and our responsive utility classes.

.col-xs-6 .col-sm-3
Resize your viewport or check it out on your phone for an example.
.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3

Offsetting columns

Move columns to the right using .col-md-offset-* classes. These classes increase the left margin of a column by * columns. For example, .col-md-offset-4 moves .col-md-4 over four columns.

.col-md-4
.col-md-4 .col-md-offset-4
.col-md-3 .col-md-offset-3
.col-md-3 .col-md-offset-3
.col-md-6 .col-md-offset-3
.col-md-4
.col-md-4 .col-md-offset-4
.col-md-3 .col-md-offset-3
.col-md-3 .col-md-offset-3
.col-md-6 .col-md-offset-3

Nesting columns

To nest your content with the default grid, add a new .row and set of .col-md-* columns within an existing .col-md-* column. Nested rows should include a set of columns that add up to 12.

Level 1: .col-md-9
Level 2: .col-md-6
Level 2: .col-md-6
Level 1: .col-md-9
Level 2: .col-md-6
Level 2: .col-md-6

Column ordering

Easily change the order of our built-in grid columns with .col-md-push-* and .col-md-pull-* modifier classes.

.col-md-9 .col-md-push-3
.col-md-3 .col-md-pull-9
.col-md-9 .col-md-push-3
.col-md-3 .col-md-pull-9

Typography

Font family

Limestone uses the Open Sans font family by Google for all elements. Open Sans is the default web font for U of S websites.

Scale

Too many type sizes can mess up any project so we use a strict typographic scale: 12, 14, 16, 20, 24, 28, 36, 45, 54, 72. All elements live within this scale.

Headings

All HTML headings, <h1> through <h6>, are available. .h1 through .h6 classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.

h1. Heading level 1

h2. Heading level 2

h3. Heading level 3

h4. Heading level 4

h5. Heading level 5
h6. Heading level 6

Create lighter, secondary text in any heading with a generic <small> tag or the .small class.

h1. Heading Secondary text

h2. Heading Secondary text

h3. Heading Secondary text

h4. Heading Secondary text

h5. Heading Secondary text
h6. Heading Secondary text

Page title

Add .uofs-page-title to a heading to use it as a page title.

Page title

Body copy

Limestone's global default font-size is 16px, with a line-height of 1.5. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of their computed line-height (24px by default).

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

...

Lead body copy

Make a paragraph stand out by adding .lead.

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

Emphasis

Make use of HTML's default emphasis tags with lightweight styles.

Small text

For de-emphasizing inline or blocks of text, use the <small> tag to set text at 85% the size of the parent. Heading elements receive their own font-size for nested <small> elements.

You may alternatively use an inline element with .small in place of any <small>

This line of text is meant to be treated as fine print.

Bold

For emphasizing a snippet of text with a heavier font-weight.

The following snippet of text is rendered as bold text.

Italics

For emphasizing a snippet of text with italics.

The following snippet of text is rendered as italicized text.

Alignment classes

Easily realign text to components with text alignment classes.

Left aligned text.

Center aligned text.

Right aligned text.

Emphasis classes

Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.

Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

Maecenas sed diam eget risus varius blandit sit amet non magna.

Etiam porta sem malesuada magna mollis euismod.

Donec ullamcorper nulla non metus auctor fringilla.

Abbreviations

Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.

Basic abbreviation

For expanded text on long hover of an abbreviation, include the title attribute with the <abbr> element.

An abbreviation of the word attribute is attr.

Initialism

Add .initialism to an abbreviation for a slightly smaller font-size.

HTML is the best thing since sliced bread.

Blockquotes

For quoting blocks of content from another source within your document.

Default blockquote

Wrap <blockquote> around any HTML as the quote. For straight quotes, we recommend a <p>.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Naming a source

Add <small> tag or .small class for identifying the source. Wrap the name of the source work in <cite>.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Someone famous in Source Title

Alternate displays

Use .pull-right for a floated, right-aligned blockquote.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Someone famous in Source Title
...

Lists

Unordered

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

Ordered

A list of items in which the order does explicitly matter.

  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem at massa

Unstyled

Remove the default list-style and left margin on list items. This only applies to immediate children list items, meaning you will need to add the class for any nested lists as well.

  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa

Inline

Place all list items on a single line with display: inline-block; and some light padding.

  • Lorem ipsum
  • Phasellus iaculis
  • Nulla volutpat

Description

A list of terms with their associated descriptions.

Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.

Horizontal description

Make terms and descriptions in <dl> line up side-by-side. Starts off stacked like default <dl>s, but when the viewport expands, so do these.

Horizontal description lists will truncate terms that are too long to fit in the left column with text-overflow. In narrower viewports, they will change to the default stacked layout.

Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
Felis euismod semper eget lacinia
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
...

Tables

Basic example

For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.

# First Name Last Name Username
1 Homer Simpson @homer
2 Marge Simpson @marge
3 Waylon Smithers @smithers
...
...

Striped rows

Use .table-striped to add zebra-striping to any table row within the <tbody>.

# First Name Last Name Username
1 Homer Simpson @homer
2 Marge Simpson @marge
3 Waylon Smithers @smithers
...
...

Bordered table

Add .table-bordered for borders on all sides of the table and cells.

# First Name Last Name Username
1 Homer Simpson @homer
2 Marge Simpson @marge
3 Waylon Smithers @smithers
...
...

Hover rows

Add .table-hover to enable a hover state on table rows within a <tbody>.

# First Name Last Name Username
1 Homer Simpson @homer
2 Marge Simpson @marge
3 Waylon Smithers @smithers
...
...

Condensed table

Add .table-condensed to make tables more compact by cutting cell padding in half.

# First Name Last Name Username
1 Homer Simpson @homer
2 Marge Simpson @marge
3 Waylon Smithers @smithers
...
...

Responsive tables

Create responsive tables by wrapping any .table in .table-responsive to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.

# Table heading Table heading Table heading Table heading Table heading Table heading
1 Table cell Table cell Table cell Table cell Table cell Table cell
2 Table cell Table cell Table cell Table cell Table cell Table cell
3 Table cell Table cell Table cell Table cell Table cell Table cell
...
...

Forms

Basic example

Individual form controls automatically receive some global styling. All textual <input>, <textarea>, and <select> elements with .form-control are set to width: 100%; by default. Wrap labels and controls in .form-group for optimum spacing.

Example block-level help text here.

Inline form

Add .form-inline to your <form> for left-aligned and inline-block controls. This only applies to forms within viewports that are at least 768px wide.

Requires custom widths

Inputs, selects, and textareas are 100% wide by default in Limestone. To use the inline form, you'll have to set a width on the form controls used within.

Always add labels

Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the .sr-only class.

Horizontal form

Use Limestone's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding .form-horizontal to the form. Doing so changes .form-groups to behave as grid rows, so no need for .row.

Supported controls

Examples of standard form controls supported in an example form layout.

Inputs

Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.

Type declaration required

Inputs will only be fully styled if their type is properly declared.

Input groups

To add integrated text or buttons before and/or after any text-based <input>, check out the input group component.

Textarea

Form control which supports multiple lines of text. Change rows attribute as necessary.

Checkboxes and radios

Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.

Default (stacked)


Inline checkboxes

Use .checkbox-inline or .radio-inline class to a series of checkboxes or radios for controls appear on the same line.

Selects

Use the default option, or add multiple to show multiple options at once.


Static control

When you need to place plain text next to a form label within a horizontal form, use the .form-control-static class on a <p>.

email@example.com

Form states

Provide feedback to users or visitors with basic feedback states on form controls and labels.

Input focus

We remove the default outline styles on some form controls and apply a box-shadow in its place for :focus.

Disabled inputs

Add the disabled attribute on an input to prevent user input and trigger a slightly different look.

Disabled fieldsets

Add the disabled attribute to a <fieldset> to disable all the controls within the <fieldset> at once.

Link functionality of <a> not impacted

This class will only change the appearance of <a class="btn btn-default"> buttons, not their functionality. Use custom JavaScript to disable links here.

Cross-browser compatibility

While Limestone will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the disabled attribute on a <fieldset>. Use custom JavaScript to disable the fieldset in these browsers.

Validation states

Limestone includes validation styles for error, warning, and success states on form controls. To use, add .has-warning, .has-error, or .has-success to the parent element. Any .control-label, .form-control, and .help-block within that element will receive the validation styles.

Control sizing

Set heights using classes like .input-lg, and set widths using grid column classes like .col-lg-*.

Height sizing

Create larger or smaller form controls that match button sizes.

Column sizing

Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.

Help text

Block level help text for form controls.

A block of help text that breaks onto a new line and may extend beyond one line.

Buttons

Options

Use any of the available button classes to quickly create a styled button.

Sizes

Fancy larger or smaller buttons? Add .btn-lg, .btn-sm, or .btn-xs for additional sizes.

Create block level buttons—those that span the full width of a parent— by adding .btn-block.

Active state

Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <button> elements, this is done via :active. For <a> elements, it's done with .active. However, you may use .active <button>s should you need to replicate the active state progammatically.

Button element

No need to add :active as it's a pseudo-class, but if you need to force the same appearance, go ahead and add .active.

Anchor element

Add the .active class to <a> buttons.

Primary link Link

Disabled state

Make buttons look unclickable by fading them back 50%.

Button element

Add the disabled attribute to <button> buttons.

Cross-browser compatibility

If you add the disabled attribute to a <button>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.

Anchor element

Add the .disabled class to <a> buttons.

Primary link Link

We use .disabled as a utility class here, similar to the common .active class, so no prefix is required.

Link functionality not impacted

This class will only change the <a>'s appearance, not its functionality. Use custom JavaScript to disable links here.

Context-specific usage

While button classes can be used on <a> and <button> elements, only <button> elements are supported within our nav and navbar components.

Button tags

Use the button classes on an <a>, <button>, or <input> element.

Link

Cross-browser rendering

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

Among other things, there's a Firefox bug that prevents us from setting the line-height of <input>-based buttons, causing them to not exactly match the height of other buttons on Firefox.

Images

Add classes to an <img> element to easily style images in any project.

Cross-browser compatibility

Keep in mind that Internet Explorer 8 lacks support for rounded corners.

... ... ...

Icons

Font Awesome icon library New in 1.1.0 +

Limestone 1.2.0 includes the complete Font Awesome (4.7.0) icon and CSS library with 675 crisp, clean icons at your disposal.

Limestone 1.1.0 included Font Awesome (4.4.0). Check the documentation for specific icons to see if they are compatible with version 4.4.0

.uofs-icon library

Deprecated

The .uofs-icon library is still available but deprecated as of 1.1.0. Any projects using 1.1.0 or greater should use the Font Awesome icons above.

  • uofs-icon-paw
  • uofs-icon-search
  • uofs-icon-email
  • uofs-icon-time
  • uofs-icon-phone
  • uofs-icon-location
  • uofs-icon-calendar
  • uofs-icon-info
  • uofs-icon-help
  • uofs-icon-alert
  • uofs-icon-grid
  • uofs-icon-list
  • uofs-icon-bullets
  • uofs-icon-edit
  • uofs-icon-cart
  • uofs-icon-crosshairs
  • uofs-icon-link
  • uofs-icon-close
  • uofs-icon-star
  • uofs-icon-heart
  • uofs-icon-feed
  • uofs-icon-plus
  • uofs-icon-minus
  • uofs-icon-user
  • uofs-icon-group
  • uofs-icon-pages
  • uofs-icon-book
  • uofs-icon-library
  • uofs-icon-bubbles
  • uofs-icon-bubble
  • uofs-icon-wifi
  • uofs-icon-computer
  • uofs-icon-tablet
  • uofs-icon-mobile
  • uofs-icon-picture
  • uofs-icon-pictures
  • uofs-icon-camera
  • uofs-icon-frame
  • uofs-icon-car
  • uofs-icon-food
  • uofs-icon-building
  • uofs-icon-smiley
  • uofs-icon-happy
  • uofs-icon-sad
  • uofs-icon-wink
  • uofs-icon-stats
  • uofs-icon-news
  • uofs-icon-cog
  • uofs-icon-refresh
  • uofs-icon-undo
  • uofs-icon-redo
  • uofs-icon-home
  • uofs-icon-switch
  • uofs-icon-checkmark
  • uofs-icon-resize
  • uofs-icon-forward
  • uofs-icon-back
  • uofs-icon-up
  • uofs-icon-down
  • uofs-icon-chevron-right
  • uofs-icon-chevron-left
  • uofs-icon-chevron-up
  • uofs-icon-chevron-down
  • uofs-icon-triangle-right
  • uofs-icon-triangle-left
  • uofs-icon-triangle-down
  • uofs-icon-triangle-up
  • uofs-icon-select
  • uofs-icon-arrow-up
  • uofs-icon-arrow-down
  • uofs-icon-arrow-diag
  • uofs-icon-pdf
  • uofs-icon-word
  • uofs-icon-excel
  • uofs-icon-twitter
  • uofs-icon-facebook
  • uofs-icon-flickr
  • uofs-icon-google
  • uofs-icon-linkedin
  • uofs-icon-youtube
  • uofs-icon-pinterest
  • uofs-icon-wiki
  • uofs-icon-instagram
  • uofs-icon-tumblr
  • uofs-icon-skype

How to use

All icons require an <i class="uofs-icon"> tag. Add the modifier class of the icon you want to use: class="uofs-icon uofs-icon-search". Place the following code in buttons, button groups for a toolbar, navigation, prepended form inputs...just about anywhere!


Helpers

Close icon

Use the generic close icon for dismissing content like modals and alerts.


Carets

Use carets to indicate dropdown functionality and direction.

Quick floats

Float an element to the left or right with a class. !important is included to avoid specificity issues.

...
...

Not for use in navbars

To align components in navbars with utility classes, use .navbar-left or .navbar-right instead.

Center content blocks

Set an element to display: block and center via margin.

...

Clearfix

Clear the float on any element with the .clearfix class.

...

Showing and hiding content

Force an element to be shown or hidden (including for screen readers) with the use of .show and .hidden classes. These classes use !important to avoid specificity conflicts, just like the quick floats. They are only available for block level toggling.

Furthermore, .invisible can be used to toggle only the visibility of an element, meaning its display is not modified and the element can still affect the flow of the document.


...

Screen reader content

Hide an element to all devices except screen readers with .sr-only.

Skip to main content

Image replacement

Utilize the .text-hide class to help replace an element's text content with a background image.

Custom heading

Spacing Classes New in 1.2.0

Limestone 1.2.0 introduces new CSS class for applying alternate spacing (margin/padding) to elements.

The spacing class names are structured like so:
.{shorthand for rule}{shorthand for direction}{shorthand for size}

Shorthand for rule Shorthand for direction Shorthand for size
  • p - padding
  • m - margin
  • t - top
  • r - right
  • b - bottom
  • l - left
  • v - vertical
  • h - horizontal
  • a - all
  • n - none
  • xs - extra small
  • sm - small
  • md - medium
  • lg - large

Some examples:

  • .ptmd - Padding Top Medium
  • .mvlg - Margin Vertical (top/bottom) Large
  • .phn - Padding Horizontal (right/left) None
  • .mbsm - Margin Bottom Small

Responsive spacing helpers

The spacing classes have the option of applying a postfix to the class name to allow spacing changes at different screen sizes.

Extra small devices
Phones
Small devices
Some phones / Tablets
Medium devices
Some tablets/Desktops
Large devices
Desktops
Class postfix -xs -sm -md -lg

The responsive spacing classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override responsive spacing classes targeted at smaller devices. Therefore, applying any .{spacing_class}-md class to an element will not only affect spacing on medium devices but also on large devices if a .{spacing_class}-lg class is not present.

Responsive Utilities

For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.

Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. Responsive utilities are currently only available for block and table toggling. Use with inline and table elements is currently not supported.

Available classes

Use a single or combination of the available classes for toggling content across viewport breakpoints.

Extra small devices Phones (<768px) Small devices Tablets (≥768px) Medium devices Desktops (≥992px) Large devices Desktops (≥1200px)
.visible-xs Visible
.visible-sm Visible
.visible-md Visible
.visible-lg Visible
.hidden-xs Visible Visible Visible
.hidden-sm Visible Visible Visible
.hidden-md Visible Visible Visible
.hidden-lg Visible Visible Visible

Print classes

Similar to the regular responsive classes, use these for toggling content for print.

Class Browser Print
.visible-print Visible
.hidden-print Visible