Bootstrap Styles

BYU's templates have some core features of Twitter Bootstrap built in.

This means you can forget wondering what sort of button styles to use, or whether there's a good jQuery dropdown plugin around. It's all there from the start. We've updated the variables.scss file with colors, fonts, and sizes that are customized and compatible with BYU's style.


FontAwesome Icons

We've also included a sweet icon set for your UI pleasure. Again, no need to reinvent the wheel here.

The latest and greatest in icon design is vectors; specifically, icon fonts. They're scalable, colorable, and completely accessible. Yes, they're that good. Happy designing. Some examples below.

Check out the full icon set (369 icons) and the useful usage guidelines.

  • fa-bars
  • fa-bolt
  • fa-calendar
  • fa-check
  • fa-cog
  • fa-comment
  • fa-lock
  • fa-refresh
  • fa-search
  • fa-trash-o
  • fa-caret-down
  • fa-caret-right
<i class="fa fa-bolt"></i> Expeliarmus!
<i class="fa fa-calendar"></i> Calendar
<i class="fa fa-cog"></i> Settings
<i class="fa fa-comment"></i> Say something!
...
  • [standard size]
  • fa-lg
  • fa-2x
  • fa-3x
<i class="fa fa-search"></i>
<i class="fa fa-search fa-lg"></i>
<i class="fa fa-search fa-2x"></i>
<i class="fa fa-search fa-3x"></i>
...
  • Spinning icon
<i class="fa fa-spin fa-cog"></i>
<i class="fa fa-spin fa-spinner"></i>
<i class="fa fa-spin fa-refresh"></i>
...

HTML5 Boilerplate (h5bp)

We've borrowed liberally from the great h5bp project for the benefit of the research that some of the best minds in web development have given there. Below are documented some of the CSS helper classes you may find useful.

Image replacement

.ir

This solves the common problem of replacing text with an image via CSS. It keeps your markup semantic and accessible, but provides most users with the an image rather than just plain text. It's really useful for logos and things like that. Notice that the markup looks like plain text, and the image

Note When using the .ir class, make sure to specify the background-image, width, and height.

Hidden text here
<div id="stretch-Y" class="ir">BYU Cougars</div>

The relevant css might look something like the following.

#stretch-Y {
  background-image:url('images/stretch_y.png');
  width:100px;
  height:65px;
}

Hiding elements

Again in the spirit of accessibility and semantics, there are several shades of visibility that may be more useful or desirable than justdisplay:none. Add the following classes to any element to get just the right effect.

.hidden

Hide from both screenreaders and browsers(h5bp.com/u)

.visuallyhidden

Hide only visually, but have it available for screenreaders (also available for focus by keyboard navigation)(h5bp.com/v)

.invisible

Hide visually and from screenreaders, but maintain layout

Clearfix

.clearfix

The ever-useful clearfix available as a global class. Apply to any container that has floated elements which shouldn't extend outside said container.

Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements for the best rendering.

Button class="" Description
btn Standard gray button with gradient
btn btn-primary Provides extra visual weight and identifies the primary action in a set of buttons
btn btn-info Used as an alternative to the default styles
btn btn-success Indicates a successful or positive action
btn btn-warning Indicates caution should be taken with this action
btn btn-danger Indicates a dangerous or potentially negative action
btn btn-inverse Alternate dark gray button, not tied to a semantic action or use
btn btn-link Deemphasize a button by making it look like a link while maintaining button behavior

Cross browser compatibility

IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.

Button sizes

Fancy larger or smaller buttons? Add .btn-large , .btn-small , or .btn-mini for additional sizes.

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

Disabled state

Make buttons look unclickable by fading them back 50%. Just add the .disabled class.

Primary link Link

Heads up!We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable links here.

One class, multiple tags

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

Link

As a best practice, try to match the element for your context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.

Headings

All HTML headings, <h1> through <h6> are styled.

h1. Heading 1

h2. Heading 2

h3. Heading 3

h4. Heading 4

h5. Heading 5
h6. Heading 6

Body copy

BYU's global default font-size is 15px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px 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.

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

<p>...</p>

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.

<p class="lead">...</p>

Extras

Alignment classes

Easily realign text to components with text alignment classes.

Left aligned text.

Center aligned text.

Right aligned text.

<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>

Emphasis classes

Convey meaning through color with a handful of emphasis utility classes.

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

Etiam porta sem malesuada magna mollis euismod.

Donec ullamcorper nulla non metus auctor fringilla.

Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.

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

<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
<p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p>
<p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.</p>
<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>

Blockquote options

Style and content changes for simple variations on a standard blockquote.

Naming a source

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

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title
<blockquote>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
  <small>Someone famous <cite title="Source Title">Source Title</cite></small>
</blockquote>

Alternate displays

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

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title
<blockquote class="pull-right">
...
</blockquote>

List options

Unstyled

Remove the default list-style and left padding on list items (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
<ul class="unstyled">
  <li>...</li>
</ul>

Inline

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

  • Lorem ipsum
  • Phasellus iaculis
  • Nulla volutpat
<ul class="inline">
  <li>...</li>
</ul>

Horizontal description list

Make terms and descriptions in <dl> line up side-by-side.

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.
<dl class="dl-horizontal">
  <dt>...</dt>
  <dd>...</dd>
</dl>

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

Alternate typographic styles

Small caps

This text should be set in small caps

Lining numerals

These numbers should be lining: 1234567890

And these should not: 1234567890