Accordions
+ +-
+
- Basic +
- Sizes +
- With Icons +
- Styles +
These are frequently used in combination with our panel components. They have a header and body.
Accordions can be used with any background color class, add them to the header and body.
NOTE: The 'alligators' (the > in the HAML below) are structural -- +without them, the browser renders the whitespace on the anchor tags, +and the images jump around by a few pixels when they're toggled.
Also see the select tabs for a toggle triggered by a select group.
+Basic
+Use this to expand and collapse content.
%a.collapsed{data: {toggle: 'collapse'}, href: '#simple-collapse-example'}
+ .when-collapsed
+ Expand me
+ .when-expanded
+ Collapse me
+#simple-collapse-example.collapse
+ Look at this content.
+
Sizes
+ +Default accordion size:
My fancy application
#accordion-1.panel
+ .panel-heading-accordion.bg-neutral-11.collapse-trigger.collapsed{data: {toggle: 'collapse', parent: '#accordion-2'}, href: '#myCollapse-1'}
+ .row
+ .col-md-23
+ %h3.h5.collapse-title.type-em-1.type-primary-2> My fancy application
+ #myCollapse-1.panel-collapse.collapse
+ .panel-body-accordion.bg-neutral-11
+ This content should hide and show when the trigger is clicked.
+
Large accordion size:
My fancy application
#accordion-2.panel
+ .panel-heading-accordion-large.bg-neutral-11.collapse-trigger.collapsed{data: {toggle: 'collapse', parent: '#accordion-2'}, href: '#myCollapse-2'}
+ .row
+ .col-md-23
+ %h3.h5.collapse-title.type-em-1.type-primary-2> My fancy application
+ #myCollapse-2.panel-collapse.collapse
+ .panel-body-accordion.bg-neutral-11
+ This content should hide and show when the trigger is clicked.
+
Styles
+Accordion with Divider:
This adds a divider between the accordion header and accordion body.
#accordion-5.panel
+ .panel-heading-accordion.bg-neutral-11.collapse-trigger.collapsed{data: {toggle: 'collapse', parent: '#accordion-3'}, href: '#myCollapse-5'}
+ .row
+ .col-md-23
+ %a
+ .when-collapsed-inline>
+ %i.fa.fa-caret-right.collapse-icon>
+ .when-expanded-inline>
+ %i.fa.fa-caret-down.collapse-icon>
+ %h3.h5.collapse-title.type-em-1.type-primary-2> My fancy application
+ #myCollapse-5.panel-collapse.collapse
+ .panel-body-accordion-divider.bg-neutral-11
+ This content should hide and show when the trigger is clicked.
+
+
Accordion with Shadow:
This adds a shadow to the accordion when it is both open and closed.
#accordion-6.panel.panel-shadow
+ .panel-heading-accordion.bg-neutral-11.collapse-trigger.collapsed{data: {toggle: 'collapse', parent: '#accordion-3'}, href: '#myCollapse-6'}
+ .row
+ .col-md-23
+ %a
+ .when-collapsed-inline>
+ %i.fa.fa-caret-right.collapse-icon>
+ .when-expanded-inline>
+ %i.fa.fa-caret-down.collapse-icon>
+ %h3.h5.collapse-title.type-em-1.type-primary-2> My fancy application
+ #myCollapse-6.panel-collapse.collapse
+ .panel-body-accordion-divider.bg-neutral-11
+ This content should hide and show when the trigger is clicked.
+
+
With Icons
+Accordion with plus/minus icon:
#accordion-3.panel
+ .panel-heading-accordion-large.collapse-trigger.collapsed{data: {toggle: 'collapse', parent: '#accordion-2'}, href: '#myCollapse-3'}
+ .row
+ .col-md-23
+ %a
+ .when-collapsed-inline>
+ %i.fa.fa-plus-square.collapse-icon>
+ .when-expanded-inline>
+ %i.fa.fa-minus-square.collapse-icon>
+ %h3.h5.collapse-title.type-em-1.type-primary-2> My fancy application
+ #myCollapse-3.panel-collapse.collapse
+ .panel-body-accordion.bg-neutral-11
+ This content should hide and show when the trigger is clicked.
+
Accordion with caret right/down icon:
#accordion-4.panel
+ .panel-heading-accordion.collapse-trigger.collapsed{data: {toggle: 'collapse', parent: '#accordion-3'}, href: '#myCollapse-4'}
+ .row
+ .col-md-23
+ %a
+ .when-collapsed-inline>
+ %i.fa.fa-caret-right.collapse-icon>
+ .when-expanded-inline>
+ %i.fa.fa-caret-down.collapse-icon>
+ %h3.h5.collapse-title.type-em-1.type-primary-2> My fancy application
+ #myCollapse-4.panel-collapse.collapse
+ .panel-body-accordion.bg-neutral-11
+ This content should hide and show when the trigger is clicked.
+
+
Alerts
+Alerts are used to display flash messages to the user. When using alerts with simple one-line text,
+wrap the text in a <p>
with .em-high
.
Success
+<div class="alert alert-success">
+ <p class="em-high">Success</p>
+</div>
+
Alerts are also used to bring important notes to a user's attention. If the content of your alert +is a little more complicated, we would recommend using headings coupled with the content.
You should know...
+There are some things you should note. Just in case you didn't figure it out already.
+-
+
- thing 1 +
- thing 2 +
<div class="alert alert-info">
+ <h5 class="em-high mtn">You should know...</h5>
+ <p>There are some things you should note. Just in case you didn't figure it out already.</p>
+ <ul>
+ <li>thing 1</li>
+ <li>thing 2</li>
+ </ul>
+</div>
+
By adding .alert-dismassable
and a button, you can also make alerts dismissable.
Click the 'X' over there------>
+<div class="alert alert-success alert-dismissable">
+ <button class="close" data-dismiss="alert">
+ <i class="fa fa-times"></i>
+ </button>
+ <p class="em-high">Click the 'X' over there------> </p>
+</div>
+
+
There are may use cases for alerts. Here is a list of our different alert types.
+
+
+
+
+
+
+
+ Everything is wonderful.
+ Be happy.
+
+ | <div class="alert alert-success alert-dismissable">
+ <button class="close" data-dismiss="alert">
+ <i class="fa fa-times"></i>
+ </button>
+ <div class="media">
+ <div class="media-left">
+ <i class="fa fa-check-circle"></i>
+ </div>
+ <div class="media-body em-high">
+ Everything is wonderful.
+ <a class="alert-link" href="http://bit.ly/QCMZM5">Be happy.</a>
+ </div>
+ </div>
+</div> |
---|---|
+
+
+
+
+
+
+
+ Info for you.
+ Tell me more.
+
+ | <div class="alert alert-info alert-dismissable">
+ <button class="close" data-dismiss="alert">
+ <i class="fa fa-times"></i>
+ </button>
+ <div class="media">
+ <div class="media-left">
+ <i class="fa fa-info-circle"></i>
+ </div>
+ <div class="media-body em-high">
+ Info for you.
+ <a class="alert-link" href="http://bit.ly/1DFns8H">Tell me more.</a>
+ </div>
+ </div>
+</div> |
+
+
+
+
+
+
+
+ Warning: There is no parking on the dancefloor.
+ Be alert.
+
+ | <div class="alert alert-warning alert-dismissable">
+ <button class="close" data-dismiss="alert">
+ <i class="fa fa-times"></i>
+ </button>
+ <div class="media">
+ <div class="media-left">
+ <i class="fa fa-exclamation-triangle"></i>
+ </div>
+ <div class="media-body em-high">
+ Warning: There is no parking on the dancefloor.
+ <a class="alert-link" href="http://bit.ly/1uM05DJ">Be alert.</a>
+ </div>
+ </div>
+</div> |
+
+
+
+
+
+
+
+
+ Something has gone horribly awry.
+ You've made a huge mistake.
+
+ | <div class="alert alert-error alert-dismissable">
+ <button class="close" data-dismiss="alert">
+ <i class="fa fa-times"></i>
+ </button>
+ <div class="media">
+ <div class="media-left">
+ <i class="fa fa-exclamation-triangle"></i>
+ </div>
+ <div class="media-body em-high">
+ Something has gone horribly awry.
+ <a class="alert-link" href="http://bit.ly/1rooFJV">You've made a huge mistake.</a>
+ </div>
+ </div>
+</div>
+ |
Alignment
+The following classes can be used to for horizontal alignment.
+ | <p class="txt-l">
+ <code>.txt-l</code>
+</p> |
---|---|
+ | <p class="txt-c">
+ <code>.txt-c</code>
+</p> |
+ | <p class="txt-r">
+ <code>.txt-r</code>
+</p>
+ |
On display: inline
and display: table-cell
elements,
+the following classes can be used to for vertical alignment.
+ .txt-t
+ |
+
+ .txt-m
+ |
+
+ .txt-b
+ |
+ + Distillery trust fund Neutra fingerstache plaid messenger bag. + Try-hard health goth PBR Helvetica hashtag. Try-hard narwhal letterpress, + crucifix selfies trust fund swag mustache quinoa chambray iPhone. + | +
<table class="table table-bordered">
+ <tr>
+ <td class="txt-t" width="20%">
+ <code>.txt-t</code>
+ </td>
+ <td class="txt-m" width="20%">
+ <code>.txt-m</code>
+ </td>
+ <td class="txt-b" width="20%">
+ <code>.txt-b</code>
+ </td>
+ <td width="40%">
+ Distillery trust fund Neutra fingerstache plaid messenger bag.
+ Try-hard health goth PBR Helvetica hashtag. Try-hard narwhal letterpress,
+ crucifix selfies trust fund swag mustache quinoa chambray iPhone.
+ </td>
+ </tr>
+</table>
+
If you need to vertically align an element that does not fit into those display types, +take a look at vertical alignment.
+Avatars
+ + +Regular avatars are expected to by 100px by 100px.
%img{src: "http://placehold.it/100x100", alt: "...", class: "img-circle avatar", height: "100", width: "100"}
+
+
Small Gravatar
+Allows you to show a gravatar with the proper default 'image' (icon).
To use in a view, simply call
= render 'shared/gravatar_small', email: 'some@email.com'
.gravatar.gravatar-sm
+ %img{src:"https://secure.gravatar.com/avatar/8b7970c372aabb936ca455127e04c959?s=20&d=blank"}
+ %i.fa.fa-user
+.gravatar.gravatar-sm
+ %img{src:"https://s.gravatar.com/avatar/c99bd3ce00444f946027741d5a5cd9e9?s=20&d=blank"}
+ %i.fa.fa-user
+
Small with Envelope
+Allows you to show a gravatar with an icon overlay.
To use in a view, simply call
= render 'shared/gravatar_small', email: 'some@email.com'
.gravatar.gravatar-sm
+ %img{src:"https://secure.gravatar.com/avatar/8b7970c372aabb936ca455127e04c959?s=20&d=blank"}
+ %i.fa.fa-user
+ %i.overlay.fa.fa-envelope
+
+.gravatar.gravatar-sm.mlxl
+ %img{src:"https://s.gravatar.com/avatar/c99bd3ce00444f946027741d5a5cd9e9?s=20&d=blank"}
+ %i.fa.fa-user
+ %i.overlay.fa.fa-envelope
+
+.gravatar.gravatar-sm.mlxl
+ %img{src:"https://secure.gravatar.com/avatar/8b7970c372aabb936ca455127e04c959?s=20&d=blank"}
+ %i.fa.fa-user.highlight
+ %i.overlay.fa.fa-check
+
+.gravatar.gravatar-sm.mlxl
+ %img{src:"https://s.gravatar.com/avatar/c99bd3ce00444f946027741d5a5cd9e9?s=20&d=blank"}
+ %i.fa.fa-user
+ %i.overlay.fa.fa-check
+
Large Gravatar
+Allows you to show a gravatar with the proper default 'image' (icon).
Large gravatar has a white background so it can be used on the edit profile form.
To use in a view, simply call
= render 'shared/gravatar_large', email: 'some@email.com'
.gravatar.gravatar-lg
+ %img{src:"https://secure.gravatar.com/avatar/8b7970c372aabb936ca455127e04c959?s=80&d=blank"}
+ %i.fa.fa-user
+.gravatar.gravatar-lg
+ %img{src:"https://s.gravatar.com/avatar/c99bd3ce00444f946027741d5a5cd9e9?s=80&d=blank"}
+ %i.fa.fa-user
+
Back to Top
+You can use this component to scroll to the top of a page. Leave off the .styleguide-component-wrapper
div when using it in other contexts.
The button will be fixed to the bottom right hand corner of the page.
You can place the link anywhere in your markup, but best practices are either towards the top or bottom of your markup.
+Backgrounds
+ +-
+
- Overlays +
- Full Bleed +
Background color classes can be applied to any element. See colors for a list of background classes.
+Full Bleed
+This example uses an about us hero image by default, but you can change it to any image you would like. +Keep in mind, blurry, treated images will look better when stretched to fit a particular content area.
Full bleed background image
+<div class='pane bg-full-bleed'>
+ <div class='container'>
+ <h1 class='type-neutral-11 txt-c'>Full bleed background image</h1>
+ </div>
+</div>
+
To modify this component to use a custom image, use an inline background-image
style like so:
Full bleed background image
+<div class='pane bg-full-bleed' style="background-image: url(images/such-awesome.jpg)">
+ <div class='container'>
+ <h1 class='type-neutral-11 txt-c'>Full bleed background image</h1>
+ </div>
+</div>
+
Overlays
+ +Buttons
+ +-
+
- Full Width +
- Styles +
- Sizes +
Button styles can be applied to any element. Typically you'll want to
+use either a <button>
or an <a>
element:
+ | %button.btn.btn-primary Button |
---|---|
Link
+ | %a.btn.btn-primary{href: "http://trulia.com"} Link
+ |
If your button is actually a link to another page, please use the
+<a>
element, while if your button performs an action, such as submitting
+a form or triggering some javascript event, then use a <button>
element.
Full Width
+There is an additional modifier that will make the button take the +full width of the container. It may be used with the any of the button +size and style modifiers.
Create block level buttons - those that span the full width of a parent - by adding .btn-block
.
%button.btn.btn-primary.btn-block Full width button
+
Sizes
+There are two sizes for buttons: Large and default. Simply apply the +size modifier class for the desired size.
<button class="btn btn-primary btn-lg">Large</button> | |
+ | <button class="btn btn-primary">Default</button>
+ |
Styles
+Button | +Disabled | +Class | +Description | +
---|---|---|---|
+ | + | btn btn-default |
+This is what buttons look like, this is the go to button style. | +
+ | + | btn btn-default-alt |
+This is what buttons look like, this is the go to button style (on white backgrounds). | +
+ | + | btn btn-primary |
+Use this button as the primary call to action | +
+ | + | btn btn-lowlight |
+Use this button for other actions, like cancel/dismiss | +
+ | + | btn btn-danger |
+This button is for delete actions, these actions should also have a confirmation dialog | +
+ | + | btn btn-highlight |
+Use this button for other important actions, e.g. restarting apps | +
+ | + | btn btn-highlight-alt |
+Use this button for other important actions, e.g. marketing call to actions | +
Code
+ +-
+
- Inline +
- Inline Dark +
- Terminal Window +
In order to show highlighted code, you will need to apply a language specific class to the code tag. For example, .language-ruby
.
There are several languages already available (and others available from the Prismjs.com website), including:
- Markup +
- CSS +
- C-like +
- JavaScript +
- Java +
- PHP +
- PHP +
- CoffeeScript +
- Sass +
- Bash +
- Python +
- HTTP +
- Ruby +
- Go +
class Foo
def bar
puts 'hi'
end
end
+%pre
+ %code.language-ruby
+ :preserve
+ class Foo
+ def bar
+ puts 'hi'
+ end
+ end
+
Make it scrollable
class Foo
def bar
puts 'hi'
end
def bar
puts 'hi'
end
def bar
puts 'hi'
end
def bar
puts 'hi'
end
def bar
puts 'hi'
end
def bar
puts 'hi'
end
def bar
puts 'hi'
end
end
+
+%pre.pre-scrollable
+ %code.language-ruby
+ :preserve
+ class Foo
+ def bar
+ puts 'hi'
+ end
+
+ def bar
+ puts 'hi'
+ end
+
+ def bar
+ puts 'hi'
+ end
+
+ def bar
+ puts 'hi'
+ end
+
+ def bar
+ puts 'hi'
+ end
+
+ def bar
+ puts 'hi'
+ end
+
+ def bar
+ puts 'hi'
+ end
+ end
+
Scrollable with too little content:
class Foo
def bar
puts 'hi'
end
end
+
+%pre.pre-scrollable
+ %code.language-ruby
+ :preserve
+ class Foo
+ def bar
+ puts 'hi'
+ end
+ end
+
Inline
+This is an example of a paragraph with an inline code snippet
within it.
<p>This is an example of a paragraph with <code>an inline code snippet</code> within it.</p>
+
Inline Dark
+This is an example of a paragraph with a dark inline code snippet
within it.
<p>This is an example of a paragraph with <code class="inline-dark">a dark inline code snippet</code> within it.</p>
+
Terminal Window
+class Foo
def bar
puts 'hi'
end
end
class Bar
def bar
puts 'hi'
end
end
class Baz
def bar
puts 'hi'
end
end
class Bop
def bar
puts 'hi'
end
end
+.terminal
+ %pre
+ %code.language-ruby
+ :preserve
+ class Foo
+ def bar
+ puts 'hi'
+ end
+ end
+
+ class Bar
+ def bar
+ puts 'hi'
+ end
+ end
+
+ class Baz
+ def bar
+ puts 'hi'
+ end
+ end
+
+ class Bop
+ def bar
+ puts 'hi'
+ end
+ end
+
Colors
+ +-
+
- Shadows & Glows +
Our color pallet is composed of several different colors. At any given point in captures the current +evolution of our design and likely includes old and new colors. Whenever possible, evolve the old +colors rather than adding new ones.
++ Sass variables should only be used in variables.css.scss. +
++ They should never be used directly when building components, because it makes + it very hard to change the values later if you can't tell how they might have been used. + You should define your own variables that use these colors in variables.css.scss. +
+This example shows proper use of Sass variables.
$tabs-active-bg-color: $gray-2;
+
-
+
- $gray-1 +
- .bg-neutral-1 +
- .type-neutral-1 +
-
+
- $gray-2 +
- .bg-neutral-2 +
- .type-neutral-2 +
-
+
- $gray-3 +
- .bg-neutral-3 +
- .type-neutral-3 +
-
+
- $gray-4 +
- .bg-neutral-4 +
- .type-neutral-4 +
-
+
- $gray-5 +
- .bg-neutral-5 +
- .type-neutral-5 +
-
+
- $gray-6 +
- .bg-neutral-6 +
- .type-neutral-6 +
-
+
- $gray-7 +
- .bg-neutral-7 +
- .type-neutral-7 +
-
+
- $gray-8 +
- .bg-neutral-8 +
- .type-neutral-8 +
-
+
- $gray-9 +
- .bg-neutral-9 +
- .type-neutral-9 +
-
+
- $gray-10 +
- .bg-neutral-10 +
- .type-neutral-10 +
-
+
- $gray-11 +
- .bg-neutral-11 +
- .type-neutral-11 +
-
+
- $dark-1 +
- .bg-dark-1 +
- .type-dark-1 +
-
+
- $dark-2 +
- .bg-dark-2 +
- .type-dark-2 +
-
+
- $dark-3 +
- .bg-dark-3 +
- .type-dark-3 +
-
+
- $brand-1 +
- .bg-brand-1 +
- .type-brand-1 +
-
+
- $brand-2 +
- .bg-brand-2 +
- .type-brand-2 +
-
+
- $brand-3 +
- .bg-brand-3 +
- .type-brand-3 +
-
+
- $brand-4 +
- .bg-brand-4 +
- .type-brand-4 +
-
+
- $brand-5 +
- .bg-brand-5 +
- .type-brand-5 +
-
+
- $accent-5 +
- .bg-accent-5 +
- .type-accent-5 +
-
+
- $accent-2 +
- .bg-accent-2 +
- .type-accent-2 +
-
+
- $accent-3 +
- .bg-accent-3 +
- .type-accent-3 +
-
+
- $accent-4 +
- .bg-accent-4 +
- .type-accent-4 +
-
+
- $accent-5 +
- .bg-accent-5 +
- .type-accent-5 +
-
+
- $error-1 +
- .bg-error-1 +
- .type-error-1 +
-
+
- $error-2 +
- .bg-error-2 +
- .type-error-2 +
-
+
- $error-3 +
- .bg-error-3 +
- .type-error-3 +
-
+
- $error-4 +
- .bg-error-4 +
- .type-error-4 +
-
+
- $warn-1 +
- .bg-warn-1 +
- .type-warn-1 +
-
+
- $warn-2 +
- .bg-warn-2 +
- .type-warn-2 +
-
+
- $warn-3 +
- .bg-warn-3 +
- .type-warn-3 +
Shadows & Glows
+ +Console
+ +-
+
- Traffic Lights +
Traffic Lights
+Traffic lights are used to show the status of the application. "On" is used for active applications, "off" for inactive, and "loading" for when the status is still loading.
On+
| %h3 On
+%ul.traffic-lights.list-unstyled.mvm
+ %li.green-light
+ %i.fa.fa-circle
+ 5
+ %li.gray-light
+ %i.fa.fa-circle
+ 1
+ %li.red-light
+ %i.fa.fa-circle
+ 8 |
---|---|
Off+
| %h3 Off
+%ul.traffic-lights.list-unstyled.mvm
+ %li.green-light.off
+ %i.fa.fa-circle
+ %li.gray-light.off
+ %i.fa.fa-circle
+ %li.red-light.off
+ %i.fa.fa-circle |
Loading+
| %h3 Loading
+%ul.traffic-lights.list-unstyled.mvm
+ %li.green-light.off.loading-green
+ %i.fa.fa-circle
+ %li.gray-light.off.loading-gray
+ %i.fa.fa-circle
+ %li.red-light.off.loading-red
+ %i.fa.fa-circle |
Dividers
+Dividers draw horizontal lines between different content groupings.
+
+ +
+%hr.divider-alternate-1
+%hr.divider-alternate-2
+
+.contrast-bar
+ %hr.divider-1
+ %hr.divider-2
+
+
Ellipsis
+The type .type-ellipsis-1-line
adds ellipsis to text when there is too much. Combine it with .col-md-*
classes to get the width you want.
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + + | %p.type-ellipsis-1-line
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
---|---|
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + + | %p.type-ellipsis-2-lines
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + + | %p.type-ellipsis-3-lines
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ |
+ Multi-line ellipsis only works on webkit. +
+Embeds
+ +-
+
- Responsive +
Responsive
+Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device.
Rules are directly applied to <iframe>
, <embed>
, and <object>
elements; optionally use an explicit descendant class .embed-responsive-item when you want to match the styling for other attributes.
Pro-Tip! You don't need to include frameborder="0"
in your <iframe>
s as we override that for you.
16-by-9
+<h1 class="h2">16-by-9</h1>
+<div class="row">
+ <div class="col-md-5">
+ <div class="embed-responsive embed-responsive-16by9">
+ <iframe class="embed-responsive-item" src="//www.youtube.com/embed/JOCtdw9FG-s"></iframe>
+ </div>
+ </div>
+ <div class="col-md-7">
+ <div class="embed-responsive embed-responsive-16by9">
+ <iframe class="embed-responsive-item" src="//www.youtube.com/embed/JOCtdw9FG-s"></iframe>
+ </div>
+ </div>
+ <div class="col-md-12">
+ <div class="embed-responsive embed-responsive-16by9">
+ <iframe class="embed-responsive-item" src="//www.youtube.com/embed/JOCtdw9FG-s"></iframe>
+ </div>
+ </div>
+</div>
+
4-by-3
+<h1 class="h2">4-by-3</h1>
+<div class="row">
+ <div class="col-md-5">
+ <div class="embed-responsive embed-responsive-4by3">
+ <iframe class="embed-responsive-item" src="//www.youtube.com/embed/Awf45u6zrP0"></iframe>
+ </div>
+ </div>
+ <div class="col-md-7">
+ <div class="embed-responsive embed-responsive-4by3">
+ <iframe class="embed-responsive-item" src="//www.youtube.com/embed/Awf45u6zrP0"></iframe>
+ </div>
+ </div>
+ <div class="col-md-12">
+ <div class="embed-responsive embed-responsive-4by3">
+ <iframe class="embed-responsive-item" src="//www.youtube.com/embed/Awf45u6zrP0"></iframe>
+ </div>
+ </div>
+</div>
+
Autoselect Text Inputs
+This form is used to show information that a user may wish to copy and paste somewhere.
%input.auto-select.form-control{:value => "This should auto highlight", 'data-behavior' => 'AutoSelect', readonly: 'readonly'}
+
Checkboxes & Radios
+ + +Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.
+Default (stacked)
+%form.styleguide-form{:role => "form"}
+ .checkbox
+ %label
+ %input{:type => "checkbox", :value => ""}
+ Option one is this and that—be sure to include why it's great
+ .radio
+ %label
+ %input#optionsRadios1{:checked => "", :name => "optionsRadios", :type => "radio", :value => "option1"}
+ Option one is this and that—be sure to include why it's great
+ .radio
+ %label
+ %input#optionsRadios2{:name => "optionsRadios", :type => "radio", :value => "option2"}
+ Option two can be something else and selecting it will deselect option one
+
Inline Checkboxes & Radios
+Use .checkbox-inline
or .radio-inline
class to a series of checkboxes or radios for controls appear on the same line.
%form.styleguide-form{:role => "form"}
+ .form-group
+ %label.checkbox-inline
+ %input#inlineCheckbox1{:type => "checkbox", :value => "option1"}
+ 1
+ %label.checkbox-inline
+ %input#inlineCheckbox2{:type => "checkbox", :value => "option2"}
+ 2
+ %label.checkbox-inline
+ %input#inlineCheckbox3{:type => "checkbox", :value => "option3"}
+ 3
+
+ .form-group
+ %label.radio-inline
+ %input#inlineradio1{:type => "radio", :value => "option1"}
+ 1
+ %label.radio-inline
+ %input#inlineradio2{:type => "radio", :value => "option2"}
+ 2
+ %label.radio-inline
+ %input#inlineradio3{:type => "radio", :value => "option3"}
+ 3
+
Disabled Controls
+Controls will occasionally need to be disabled.
+You can do that by adding the disabled
attribute.
+Inputs, selects, checkboxes, fieldsets, buttons, and other form controls can all be disabled.
<input class="form-control" type="text" placeholder="Disabled input here" disabled> | |
<select class="form-control" disabled>
+ <option>Option 1</option>
+ <option>Option 2</option>
+</select> | |
<label>
+ <input type="checkbox" disabled>
+ I'm disabled!
+</label> | |
+ | <button class="btn" disabled>
+ Hi
+</button>
+ |
Help Text
+Help text +Block level help text for form controls.
%form.styleguide-form{:role => "form"}
+ %input.form-control{:type => "text"}
+ %span.help-block A block of help text that breaks onto a new line and may extend beyond one line.
+
Inline Forms
+ + +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.
+ Always add labels to every input. +
+
+ Screen readers will have trouble with your forms if you don't.
+ You can always hide the labels using the .sr-only
class.
+
%form.styleguide-form.form-inline{:role => "form"}
+ .form-group
+ %label.sr-only{:for => "exampleInputEmail2"} Email address
+ %input#exampleInputEmail2.form-control{:placeholder => "Enter email", :type => "email"}
+ .form-group
+ %label.sr-only{:for => "exampleInputPassword2"} Password
+ %input#exampleInputPassword2.form-control{:placeholder => "Password", :type => "password"}
+ .checkbox
+ %label
+ %input{:type => "checkbox"}
+ Remember me
+ %button.btn.btn-primary{:type => "submit"} Sign in
+
Inline Forms with Labels
+Add .form-inline.inline-labels
to your <form>
for left-aligned and inline-block controls with labels inline with inputs.
%form.styleguide-form.form-inline.inline-labels{:role => "form"}
+ .form-group
+ %label{:for => "exampleInputEmail2"} Write a thing
+ %input#exampleInputEmail2.form-control{:placeholder => "Write a thing", :type => "email"}
+ .form-group
+ %label{:for => "exampleSelect"} Choose a thing
+ %select#exampleSelect.form-control
+ %option thing
+ .checkbox
+ %label
+ %input{:type => "checkbox"}
+ Remember me
+ %button.btn.btn-primary{:type => "submit"} Sign in
+
Inputs & Labels
+ +-
+
- HTML5 Controls +
- Sizing +
- Search Inputs +
- Read-Only Inputs +
An input with the label top aligned (this is the default layout).
%form.styleguide-form{:role => "form"}
+ .form-group
+ %label{:for => "exampleInputEmail1"}
+ %abbr{:title => "required"} *
+ Email address
+ %input#exampleInputEmail1.form-control{:placeholder => "Enter email", :type => "email", :required => "required", 'aria-required' => "true"}
+
Use Bootstrap'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
.
An input with the label left aligned
%form.styleguide-form.form-horizontal{:role => "form"}
+ .form-group
+ .col-md-6
+ %label.control-label{:for => "exampleInputEmail1"}
+ %abbr{:title => "required"} *
+ Email address
+ .col-md-18
+ %input#exampleInputEmail1.form-control{:placeholder => "Enter email", :type => "email", :required => "required", 'aria-required' => "true"}
+
An input with the label right aligned (N.B., control-label class provides the right alignment):
%form.styleguide-form.form-horizontal{:role => "form"}
+ .form-group
+ %label.col-md-6.control-label{:for => "exampleInputEmail1"}
+ %abbr{:title => "required"} *
+ Email address
+ .col-md-18
+ %input#exampleInputEmail1.form-control{:placeholder => "Enter email", :type => "email", :required => "required", 'aria-required' => "true"}
+
An unstyled inputs that doesn't have any of the default input styles
%form{:role => "form"}
+ %input.unstyled{"placeholder" => "This is a text input"}
+
HTML5 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
.
+ Inputs will only be fully styled if their type is properly declared. +
+%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Text input", :type => "text"}
+
Password field
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Password", :type => "password"}
+
Date
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Date", :type => "date"}
+
Number
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Number", :type => "number"}
+
With a min/max and default starting value
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Number", :type => "number", min: 0, max: 2, value: 1}
+
With a different increment value
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Number", :type => "number", step: 5}
+
Use this with fields that require email addresses to pop up the correct keyboard on mobile
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Email", :type => "email"}
+
URL
Use this with fields that require urls to pop up the correct keyboard on mobile
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "URL", :type => "url"}
+
Telephone
Use this with fields that require telephone numbers to pop up the dialpad on mobile
%form.styleguide-form{:role => "form"}
+ %input.form-control{:placeholder => "Telephone", :type => "tel"}
+
Sizing
+Set heights using the form control classes .input-lg
and .input-sm
.
+Create larger or smaller form controls that match button sizes.
<input class="form-control input-lg" placeholder=".input-lg" type="text"> | |
<input class="form-control" placeholder="Default Input" type="text"> | |
+ | <input class="form-control input-sm" placeholder=".input-sm" type="text">
+ |
Set widths using grid column classes like .col-lg-*
.
+Wrap selects in grid columns, or any custom parent element, to easily enforce desired widths.
%form.styleguide-form{:role => "form"}
+ .row
+ .col-md-4
+ %input.form-control{:placeholder => ".col-xs-2", :type => "text"}
+ .col-md-6
+ %input.form-control{:placeholder => ".col-xs-3", :type => "text"}
+ .col-md-8
+ %input.form-control{:placeholder => ".col-xs-4", :type => "text"}
+
Search Inputs
+Use this input when creating a search component.
<div class="form-group form-group-search">
+ <input class="form-control" placeholder="This is a searchbox">
+ <i class="fa fa-search"></i>
+</div>
+
Read-Only Inputs
+Add the readonly
boolean attribute on an input to prevent user input and style the input as disabled.
<input class="form-control" type="text" placeholder="Readonly input here..." readonly>
+
Selects
+ +-
+
- Sizing +
- Fancy Selects +
Selects are excellent to use because they will automatically +behave as expected cross browser on different devices. Prefer +them over a custom dropdown whenever possible.
%form.styleguide-form{:role => "form"}
+ %select.form-control
+ %option default option
+ %option an option
+ %option another option
+
Sizing
+Set heights using the form control classes .input-lg
and .input-sm
.
+Create larger or smaller form controls that match button sizes.
<select class="form-control input-lg">
+ <option>Option 1</option>
+ <option>Option 2</option>
+</select> | |
<select class="form-control" Input">
+ <option>Option 1</option>
+ <option>Option 2</option>
+</select> | |
+ | <select class="form-control input-sm">
+ <option>Option 1</option>
+ <option>Option 2</option>
+</select>
+ |
Set widths using grid column classes like .col-lg-*
.
+Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.
%form.styleguide-form{:role => "form"}
+ .row
+ .col-md-4
+ %input.form-control{:placeholder => ".col-xs-2", :type => "text"}
+ .col-md-6
+ %input.form-control{:placeholder => ".col-xs-3", :type => "text"}
+ .col-md-8
+ %input.form-control{:placeholder => ".col-xs-4", :type => "text"}
+
Fancy Selects
+This is a fancy select!
%form.styleguide-form{:role => "form", 'style' => 'width: 200px'}
+ %label{:for => "fancy-select"} Description
+ .select-fancy
+ %select.form-control
+ %option Fancy Option 1
+ %option Fancy Option 2
+
Static Controls
+When you need to place plain text next to a form label within a form,
+use the .form-control-static
class on a <p>
.
Here's an example in a horizontal form:
%form.form-horizontal.styleguide-form{:role => "form"}
+ .form-group
+ %label.col-md-4.control-label Email
+ .col-sm-10
+ %p.form-control-static email@example.com
+ .form-group
+ %label.col-md-4.control-label{:for => "inputPassword"} Password
+ .col-sm-10
+ %input#inputPassword.form-control{:placeholder => "Password", :type => "password"}
+
Here's an example in a vertical form:
%form.styleguide-form{:role => "form"}
+ .form-group
+ %label.control-label Email
+ %p.form-control-static someguy@test.com
+ .form-group
+ %label.control-label{:for => "name"} Name
+ %input#name.form-control{:placeholder => "name"}
+
Text Areas
+Text areas are used for larger amounts of input.
%form.styleguide-form{:role => "form"}
+ .form-group
+ %label{:for => "exampleTextAreaId"} Description
+ %textarea#exampleTextAreaId.form-control{:rows => "3"}
+
Toggle Switches
+A toggle switch is a horizontally styled checkbox which represents true with blue and false with gray.
<div class="form-group">
+ <input id="toggleSwitch" class="toggle-switch toggle-switch-lg" type="checkbox">
+ <label for="toggleSwitch">Toggle Switch</label>
+</div>
+
Validations
+To show validation errors on a field, add .has-error
to the field's form group.
+This class can be used for all types of inputs.
Error messages should use the classes .help-block.has-error
.
<form class="styleguide-form" role="form">
+ <div class="form-group has-error">
+ <label class="control-label" for="inputError">
+ Input with error
+ </label>
+ <input id="inputError" class="form-control" type="text">
+ <span class="help-block has-error">
+ Error help text
+ </span>
+ </div>
+</form> | |
+ | <form class="styleguide-form" role="form">
+ <div class="form-group has-error">
+ <div class="checkbox">
+ <label class="control-label">
+ <input type="checkbox" value="">
+ Checkbox which needs to be checked
+ </label>
+ <span class="help-block has-error">
+ Error help text
+ </span>
+ </div>
+ </div>
+</form>
+ |
If you're doing client-side validation and want to show successful validation of a field,
+add .has-success
to the field's form group.
+ The .has-success
class can only be used on inputs that have a text-box.
+
+ | <form class="styleguide-form" role="form">
+ <div class="form-group has-success">
+ <label class="control-label" for="inputSuccess">
+ Input with success
+ </label>
+ <input id="inputSuccess" class="form-control" type="text">
+ </div>
+</form>
+ |
---|
Grids
+ +-
+
- Introduction +
- Media Queries +
- Grid Sizes +
- Examples +
- Gutter Sizes +
- Responsive Column Resets +
- Offsetting Columns +
- Column Ordering +
+ Pivotal ui (via bootstrap) includes a responsive, mobile first fluid grid system that + appropriately scales up to 24 columns as the device or viewport size increases. + To work with the system, you need to treat mobile as your default + and build more complex layouts up from there. +
+ +Introduction
+Grid systems are used for creating page layouts through a series of rows and columns that house your content. +Here's how the bootstrap grid system works:
Rows must be placed within a
.container
for proper alignment and padding.
+Use
.row
to create horizontal groups of columns.
+Content should be placed within columns (e.g.
.col-sm-11
,.col-lg-6
, etc.). +Only columns may be immediate children of rows.
+
Columns are defined by two properties: +the breakpoint at which they start acting like columns, +and their relative width (on a scale of 24) beginning at this breakpoint. +For example:
A column with the class
.col-sm-11
will take up 100% of the container +for devices with screen-width < 768px (the extra small breakpoint), +and 11/24ths for devices ≥ 768px.
+A column with the class
.col-lg-6
will take up 100% of the container +for devices with < 1200px, +and 1/4th (6/24ths) for devices ≥ 1200px.
+3
.col-md-8
columns would fill a row for devices ≥ 992px. +They would each take up their own row on devices < 992px.
+Use the
.col-xs-*
classes to use a grid on mobile.
+
Look to the examples for applying these principles to your code.
+Media Queries
+We use the following media queries in our sass files to create the key breakpoints in our grid system.
Name | +Size | +Variable Name | +
---|---|---|
mobile | ++ | no media query since this is the default in bootstrap | +
x-small | +480px | +$screen-xs-min |
+
small | +768px | +$screen-sm-min |
+
medium | +992px | +$screen-md-min |
+
large | +1200px | +$screen-lg-min |
+
x-large | +1800px | +$screen-xl-min |
+
Grid Sizes
+See how aspects of the bootstrap grid system work across multiple devices with a handy table.
++ | + extra small devices + phones (≤768px) + | ++ small devices + tablets (>768px) + | ++ medium devices + laptops (>992px) + | ++ large devices + desktops (>1200px) + | +
---|---|---|---|---|
grid behavior | +horizontal at all times | +collapsed to start, horizontal above breakpoints | +||
container width | +none (auto) | +750px | +970px | +1170px | +
class prefix | +.col-xs- |
+ .col-sm- |
+ .col-md- |
+ .col-lg- |
+
# of columns | +24 | +|||
column width | +auto | +~62px | +~81px | +~97px | +
gutter width | +30px (15px on each side of a column) | +|||
nestable | +yes | +|||
offsets | +yes | +|||
column ordering | +yes | +
Examples
+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
.
The .grid-show
class in the examples is for demo purposes. Don't use it IRL.
<div class="row grid-show">
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+ <div class="col-md-2"></div>
+</div>
+
+<div class="row grid-show">
+ <div class="col-md-16"></div>
+ <div class="col-md-8"></div>
+</div>
+
+<div class="row grid-show">
+ <div class="col-md-8"></div>
+ <div class="col-md-8"></div>
+ <div class="col-md-8"></div>
+</div>
+
+<div class="row grid-show">
+ <div class="col-md-12"></div>
+ <div class="col-md-12"></div>
+</div>
+
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.
<!-- stack the columns on mobile by making one full-width and the other half-width -->
+<div class="row grid-show">
+ <div class="col-xs-24 col-md-16"></div>
+ <div class="col-xs-12 col-md-8"></div>
+</div>
+
+<!-- columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
+<div class="row grid-show">
+ <div class="col-xs-12 col-md-8"></div>
+ <div class="col-xs-12 col-md-8"></div>
+ <div class="col-xs-12 col-md-8"></div>
+</div>
+
+<!-- columns are always 50% wide, on mobile and desktop -->
+<div class="row grid-show">
+ <div class="col-xs-12"></div>
+ <div class="col-xs-12"></div>
+</div>
+
Example: Mobile, Tablet, Desktops
+Build on the previous example by creating even more dynamic and powerful layouts
+with tablet .col-sm-*
classes.
<div class="row grid-show">
+ <div class="col-xs-24 col-sm-12 col-md-16"></div>
+ <div class="col-xs-12 col-md-8"></div>
+</div>
+<div class="row grid-show">
+ <div class="col-xs-12 col-sm-8"></div>
+ <div class="col-xs-12 col-sm-8"></div>
+ <!-- optional: clear the xs cols if their content doesn't match in height -->
+ <div class="clearfix visible-xs-block"></div>
+ <div class="col-xs-12 col-sm-8"></div>
+</div>
+
Example: Column Wrapping
+If more than 24 columns are placed within a single row, each group of extra columns will, +as one unit, wrap onto a new line.
<div class="row grid-show">
+ <div class="col-xs-12"></div>
+ <div class="col-xs-12"></div>
+ <div class="col-xs-10"></div>
+ <div class="col-xs-10"></div>
+ <div class="col-xs-5"></div>
+ <div class="col-xs-6"></div>
+</div>
+
note In the second row, since 10 + 10 + 5 > 24, +the 5-column-wide div gets wrapped onto a new line as one contiguous unit. +Subsequent columns continue along the new line.
+Gutter Sizes
+You can change the size of a row's gutters with these classes.
Class | +Padding between columns | +
---|---|
default | +20px | +
.row-gutter-md |
+10px | +
.row-gutter-sm |
+5px | +
Here's what the gutters look like in action.
+
+
+ | <div class="row grid-show">
+ <div class="col-md-12" grid-content="Default gutter"></div>
+ <div class="col-md-12" grid-content="Default gutter"></div>
+</div> |
---|---|
+
+
+ | <div class="row row-gutter-md grid-show">
+ <div class="col-md-12" grid-content="Medium gutter"></div>
+ <div class="col-md-12" grid-content="Medium gutter"></div>
+</div> |
+
+
+
+ | <div class="row row-gutter-sm grid-show">
+ <div class="col-md-12" grid-content="Small gutter"></div>
+ <div class="col-md-12" grid-content="Small gutter"></div>
+</div>
+ |
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.
<div class="row grid-show">
+ <div class="col-xs-12 col-sm-6" grid-content="this is a tall column"></div>
+ <div class="col-xs-12 col-sm-6"></div>
+
+ <!-- add the extra clearfix for only the required viewport -->
+ <div class="clearfix visible-xs-block"></div>
+
+ <div class="col-xs-12 col-sm-6"></div>
+ <div class="col-xs-12 col-sm-6"></div>
+</div>
+
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.
<div class="row grid-show">
+ <div class="col-md-8"></div>
+ <div class="col-md-8 col-md-offset-8"></div>
+</div>
+<div class="row grid-show">
+ <div class="col-md-6 col-md-offset-6"></div>
+ <div class="col-md-6 col-md-offset-6"></div>
+</div>
+<div class="row grid-show">
+ <div class="col-md-12 col-md-offset-6"></div>
+</div>
+
Column Ordering
+Easily change the order of our built-in grid columns
+with .col-md-push-*
and .col-md-pull-*
modifier classes.
+This is useful if you want to change the order of columns at different screen sizes.
<div class="row grid-show">
+ <div class="col-md-18 col-md-push-6"></div>
+ <div class="col-md-6 col-md-pull-18"></div>
+</div>
+
Iconography
+ +-
+
- Spinners +
We use Font Awesome for scalable vector icons that can be customized - size, color, drop shadow, +and anything that can be done with CSS. These icons will always match the font color.
Here are some commonly used icons:
Button | +Class | +Description | +
---|---|---|
+ | .fa.fa-plus |
+Renders our plus icon | +
+ | .fa.fa-user |
+Renders our person icon | +
+ | .fa.fa-sort-down |
+Renders our triangle icon | +
+ | .fa.fa-cog |
+Renders our gear icon | +
+ | .fa.fa-times |
+Renders our 'x' icon | +
+ | .fa.fa-check |
+Renders our check icon | +
+ | .fa.fa-chevron-right |
+Renders our right chevron icon | +
+ | .fa.fa-chevron-up |
+Renders our down chevron icon | +
+ | .fa.fa-chevron-down |
+Renders our down chevron icon | +
+ | .fa.fa-windows |
+Renders our Windows icon | +
+ | .fa.fa-apple |
+Renders our Apple icon | +
+ | .fa.fa-linux |
+Renders our Linux icon | +
+ | .fa.fa-pencil |
+Renders our edit icon | +
+ | .fa.fa-plus-circle |
+Renders our second add icon | +
+ | .fa.fa-trash-o |
+Renders our delete icon | +
+ | .fa.fa-square |
+Renders our square icon | +
+ | .fa.fa-repeat |
+Renders our refresh/restart icon | +
+ | .fa.fa-play |
+Renders our start icon | +
+ | .fa.fa-download |
+Renders our download icon | +
+%i.fa.fa-download.type-brand-3.title
+
Spinners
+Spinners are used to show that some action is in progress. Spinners come in two sizes: large and small.
.spinner-lg.bkg-default-5.out
+ %i.fa.fa-spin.fa-cog.mtxl
+
+.spinner-sm.bkg-default-5.out
+ %i.fa.fa-spin.fa-cog.mtxl
+
Images
+ +-
+
- Responsive +
- Responsive SVG +
Responsive
+Images can be made responsive-friendly via the addition of the .img-responsive
class. This applies max-width: 100%;
and height: auto;
to the image so that it scales nicely to the parent element. See bootstrap 3 for further documentation of this feature.
.row
+ .col-md-5
+ %img.img-responsive{:alt => "Responsive image", :src => "../images/such-awesome.jpg"}
+ .col-md-7
+ %img.img-responsive{:alt => "Responsive image", :src => "../images/such-awesome.jpg"}
+ .col-md-12
+ %img.img-responsive{:alt => "Responsive image", :src => "../images/such-awesome.jpg"}
+
Responsive SVG
+SVG can be made responsive-friendly via the addition of the .svg-responsive
class on a
+wrapper div and the .svg-content
class on the svg itself. You'll also need to to define
+the height to width ratio as an inline padding bottom style on the .svg-responsive
element like so:
<div class="svg-responsive" style="padding-bottom: 78.31%">
+ <svg class="svg-content" viewBox="38 45 125 120" preserveAspectRatio="xMinYMin meet">
+ ...
+ </svg>
+</div>
+
The padding-bottom
should equal the height divided by the width of your specific svg.
For more information about setting up your svg, read this article about svg coordinates systems by Sara Soueidan.
+Labels
+ +-
+
- Removable Labels +
Labels are based on Bootstrap's labels. +Here's an example of a label on its own.
new
+ | <span class="label label-primary">new</span>
+ |
---|
You can also place labels within HTML elements. +It will be sized based on the element's font size and its font modifiers.
I am a P. + new + | <p>I am a P.
+ <span class="label label-primary">new</span>
+</p> |
---|---|
I am an H3. + new + | <h3>I am an H3.
+ <span class="label label-primary">new</span>
+</h3> |
I am an H3 with an H5 modifier. + new ++ | <h3 class="h5">I am an H3 with an H5 modifier.
+ <span class="label label-primary">new</span>
+</h3>
+ |
Removable Labels
+Removable labels are used as tags in an editable list. The user will either enter text or select content (i.e.: a dropdown item), and it will be styled as a removable label (most likely in a list). Developers who use these labels must implement the close functionality for when the user clicks the close button.
<span class="label-removable">Removable
+ <a class="close-btn fa fa-close"></a>
+</span>
+
Layout Lists
+Sometimes you might want to use lists to lay out elements on the page.
Inline lists and vertical divider lists +are particularly useful when you don't know the width of the element you want to layout, +or you want to vertically align it.
Use Card lists if you'd like to make a grid of vertically and horizontally aligned cards.
+Links
+There are five different kinds of links you can use to connect related content. In most cases (unless the designer specifically asks for another type of link) you should choose the default link.
%a{href: "http://google.com"}
+ %i.fa.fa-plus
+ link with an icon
+
Link | +Class | +Description | +
---|---|---|
default link | ++ | This is what buttons look like, this is the go to button style. | +
lowlight link | +link-lowlight |
+I'm afraid I can't let you do that, yet. | +
lowlight link alternate | +link-lowlight-alt |
+Less important links | +
inverse link | +link-inverse |
+I go on a non-white background | +
Lists
+ +-
+
- Inline +
- Ordered +
- Unordered +
- Unstyled +
- Inline Divider +
- Breadcrumb +
- Group +
- Event +
- Vertical Divider +
- Steps +
- Checked +
- Cards +
- List Spacing +
This section contains different list styles.
+Breadcrumb
+The .list-breadcrumb
can be used to provide additional page navigation.
Breadcrumbs use their own monospace font-family.
%ul.list-breadcrumb
+ %li
+ %a{href: "http://google.com"}
+ Parent
+ %li
+ %a{href: "http://google.com"}
+ Child
+ %li.current
+ %span
+ Current Page
+
Cards
+As the browser width changes, list-cards fill in one after another. There are two card types, type-card-1
and
+type-card-2
. For this example, we've set both of them to stack on mobile sized screens.
| <ul class="list-cards list-card-1 list-cards-xs">
+ <li class="bg-neutral-7">
+ <p>list-card-1</p>
+ </li>
+</ul> |
---|---|
| <ul class="list-cards list-card-2 list-cards-xs">
+ <li class="bg-neutral-7">
+ <p>list-card-2</p>
+ </li>
+</ul>
+ |
You can specify the breakpoint in which the cards stack by using the list-card-*
classes. If the breakpoint is not
+specified, the cards fill 100% of the list-cards
width.
List Card Breakpoints | +Class Names | +
---|---|
extra-small | +.list-card-xs |
+
small | +.list-card-sm |
+
medium | +.list-card-md |
+
large | +.list-card-lg |
+
extra-large | +.list-card-xl |
+
The cards list should only be used in fully liquid layouts, otherwise grids are a better choice.
+This is an example of a card list with the list-cards-xs
stack point applied.
+Resize the browser to see how cards stack on desktop sizes and expand on mobile sizes.
-
+
-
+
lorem ipsum 1
+
+ -
+
lorem ipsum 2
+
+ -
+
lorem ipsum 3
+
+ -
+
lorem ipsum 4
+
+ -
+
lorem ipsum 5
+
+ -
+
lorem ipsum 6
+
+ -
+
lorem ipsum 7
+
+ -
+
lorem ipsum 8
+
+
<ul class="list-cards list-card-2 list-cards-xs">
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 1</p>
+ </li>
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 2</p>
+ </li>
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 3</p>
+ </li>
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 4</p>
+ </li>
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 5</p>
+ </li>
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 6</p>
+ </li>
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 7</p>
+ </li>
+ <li class="bg-neutral-7">
+ <p>lorem ipsum 8</p>
+ </li>
+</ul>
+
If you would like custom card dimensions, in your sass include the makeCard mixin, like so: @include makeCard(height, width, name);
+You can then access the class via .list-card-#{name}
.
Clickable List Cards
+If you want your list cards to function as links (i.e. be clickable),
+wrap all the inner content in a
with class list-card-link
.
<ul class="list-cards list-card-1 list-cards-xs">
+ <li class="bg-neutral-7">
+ <a class="list-card-link" href="http://bit.ly/1sEyvH5">
+ <p>This entire list card is clickable!</p>
+ </a>
+ </li>
+ <li class="bg-neutral-7">
+ <a class="list-card-link" href="http://bit.ly/1sFaArX">
+ <p>This entire list card is clickable as well!</p>
+ </a>
+ </li>
+</ul>
+
Checked
+Replaces the default bullet image with the font awesome checkmark.
-
+
- + feep + +
- + fop + +
- + meep + +
%ul.list-checked
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep
+
Event
+This is a special list-group, with styles per-event for colors and icons.
Note: If you need a list item that with an icon that isn't shown below, +take a look at icons, and let us know which one you want.
-
+
-
+ +++ ++++started app+
+
-
+ +++ ++++stopped app+
+
-
+ +++ ++++updated app+
+
-
+ +++ ++++scaled app+
+
-
+ +++ ++++app crashed+
+
-
+ +++ ++++created app+
+
-
+ +++ ++++renamed app+
+
%ul.list-group.event-list
+ %li.list-group-item.started
+ .media
+ .pull-left
+ .event-icon
+ .media-body
+ .event-title started app
+ %li.list-group-item.stopped
+ .media
+ .pull-left
+ .event-icon
+ .media-body
+ .event-title stopped app
+ %li.list-group-item.updated
+ .media
+ .pull-left
+ .event-icon
+ .media-body
+ .event-title updated app
+ %li.list-group-item.scaled
+ .media
+ .pull-left
+ .event-icon
+ .media-body
+ .event-title scaled app
+ %li.list-group-item.crashed
+ .media
+ .pull-left
+ .event-icon
+ .media-body
+ .event-title app crashed
+ %li.list-group-item.created
+ .media
+ .pull-left
+ .event-icon
+ .media-body
+ .event-title created app
+ %li.list-group-item.renamed
+ .media
+ .pull-left
+ .event-icon
+ .media-body
+ .event-title renamed app
+
Group
+Use this list when you need simple gray borders between items
-
+
- + item 1 + +
- + item 2 + +
- + item 3 + +
%ul.list-group
+ %li.list-group-item
+ item 1
+ %li.list-group-item
+ item 2
+ %li.list-group-item
+ item 3
+
Inline
+An inline list is one of the three methods for laying out content (including grids and the media block).
-
+
- + feep + +
- + fop + +
- + meep + +
%ul.list-inline
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep
+
You can use inline lists to lay out elements. Here's an example of a header next to a button:
-
+
-
+
Bound Services
+
+ - + Add from Marketplace + +
<ul class="list-inline lhxl">
+ <li class="txt-m">
+ <h5 class="em-alt em-max">Bound Services</h5>
+ </li>
+ <li class="txt-m">
+ <a class="btn btn-default" target="_blank">Add from Marketplace</a>
+ </li>
+</ul>
+
Inline Divider
+Places all list items on a single line with display: inline-block;
and some light padding. The .list-inline-divider
+also adds a simple gray border (add .list-inline-divider-light
to make the border white).
%ul.list-inline-divider
+ %li
+ %a.type-em-1{href: "http://google.com"}<
+ Edit
+ %li
+ %a.type-em-1{href: "http://google.com"}<
+ Invite
+
+.contrast-bar
+ %ul.list-inline-divider.list-inline-divider-light
+ %li
+ %a.type-em-1{href: "http://google.com"}<
+ Edit
+ %li
+ %a.type-em-1{href: "http://google.com"}<
+ Invite
+
+
+
Ordered
+-
+
- + feep + +
- + fop + +
- + meep + +
%ol
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep
+
Steps
+Use this list when you need to show the steps in a flow.
-
+
- + Sign up Account + +
- + Create Organization + +
- + Do other things + +
- + And more things + +
%ol.list-steps
+ %li
+ Sign up Account
+ %li.current
+ Create Organization
+ %li
+ Do other things
+ %li
+ And more things
+
+
Unordered
+-
+
- + feep + +
- + fop + +
- + meep + +
%ul.list-unordered
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep
+
Unstyled
+Places all list items on a single line with display: inline-block;
and some light padding. The .list-unstyled
class can be applied to either a <ul>
or and <ol>
.
-
+
- + feep + +
- + fop + +
- + meep + +
%ul.list-unstyled
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep
+
Vertical Divider
+Use this list when you need larger gray borders between +items. It should be used in concert with grid column +sizes when you want the items to take a particular width.
We achieve equal height columns using the padding/margin hack,
+so we need an additional .height-enforcer
element to get the
+right min-height.
-
+
-
+ + item 1 ++
+
-
+ + item 2 ++
+
-
+ + item 3, which is taller ++
+
%ul.list-vertical-divider
+ %li.col-md-8
+ .height-enforcer
+ item 1
+ %li.col-md-8
+ .height-enforcer
+ item 2
+ %li.col-md-8
+ .height-enforcer{style: 'height: 200px'}
+ item 3, which is taller
+
-
+
-
+ + item 1 ++
+
-
+ + item 2 ++
+
-
+ + item 3, which is taller ++
+
%ul.list-vertical-divider-2
+ %li.col-md-8
+ .height-enforcer
+ item 1
+ %li.col-md-8
+ .height-enforcer
+ item 2
+ %li.col-md-8
+ .height-enforcer{style: 'height: 200px'}
+ item 3, which is taller
+
List Spacing
+Most lists come with built in default spacing that should work for you. However, if you find yourself needing to modify the spacing, you should do that with list spacing classes rather than whitespace classes. A single class can be applied to the list and all direct children will be modified.
+The classes are constructed by specifying <type><location><size>
.
Type: | +||
---|---|---|
l |
+ list | +Space on the inside of each of the li direct children of the element | +
Location: | +||
h |
+ horizontal | +Adds spacing to the left and right of the li . |
+
v |
+ vertical | +Adds spacing to the top and bottom of the li . |
+
Size: | +||
xl |
+ extra large | +Adds 21 pixels of space | +
l |
+ large | +Adds 10 pixels of space | +
m |
+ medium | +Adds 7 pixels of space | +
s |
+ small | +Adds 5 pixels of space | +
n |
+ none | +Sets any existing space to 0 | +
Vertical Spacing Options (n
-> xl
)
+
| %ul.lvn
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
---|---|
| %ul.lvs
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
| %ul.lvm
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
| %ul.lvl
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
| %ul.lvxl
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep
+ |
Horizontal Spacing Options (n
-> xl
)
+
| %ul.list-inline.lhn
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
---|---|
| %ul.list-inline.lhs
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
| %ul.list-inline.lhm
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
| %ul.list-inline.lhl
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep |
| %ul.list-inline.lhxl
+ %li
+ feep
+ %li
+ fop
+ %li
+ meep
+ |
Maps
+Full width map with marker at Pivotal Labs SF location, and an optional informational overlay.
<script src="http://maps.googleapis.com/maps/api/js?libraries=places"></script>
+<div class='map-wrapper'>
+ <div class='pane'>
+ <div class='container pan'>
+ <div class='row'>
+ <div class='col-sm-6 col-md-8 col-sm-offset-1'>
+ <div class='map-overlay panel panel-basic bg-neutral-10 paxxl'>
+ <h3 class="h2">Location</h3>
+ <address class='h4 pvl'>Pivotal Software Inc.<br>
+ 875 Howard Street<br>
+ San Francisco, CA 94103
+ </address>
+ <p class='h4'>Support: <a href='mailto:support@run.pivotal.io'>support@run.pivotal.io</a></p>
+ <p class='h4'>Twitter: <a href='https://twitter.com/pivotalws'>@pivotalws</a></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class='pane pane-map'>
+ <div id='labs-map'></div>
+ </div>
+</div>
+
var maps = (function() {
+ var self = this;
+ var map;
+
+ var mapOptions = {
+ placeId: "ChIJ9w1pfYiAhYAR45k8AD-TjhA",
+ center: new google.maps.LatLng(37.781787,-122.403911),
+ mapElementId: 'labs-map',
+ zoom: 18
+ };
+
+ var initialize = function() {
+ map = new google.maps.Map(document.getElementById(mapOptions.mapElementId), {
+ center: mapOptions.center,
+ zoom: mapOptions.zoom,
+ disableDefaultUI: true
+ });
+
+ var request = {
+ placeId: mapOptions.placeId
+ };
+
+ var service = new google.maps.places.PlacesService(map);
+ service.getDetails(request, createMarker);
+ };
+
+ var createMarker = function(place, status) {
+ if (status == google.maps.places.PlacesServiceStatus.OK) {
+ new google.maps.Marker({
+ map: map,
+ position: place.geometry.location
+ });
+ }
+ };
+
+ self.initialize = initialize;
+ return self;
+})();
+
+google.maps.event.addDomListener(window, 'load', maps.initialize);
+
Marketing
+ +-
+
- Instance Scale +
Instance Scale
+The instance scale widget is an svg and an associated code block. Include the SVG
+and code in your page and the javascript and css will handle all of the behaviors.
+Add the class .selected-group
to the .instance-column
you would like to be
+highlighted on page load.
+
+ $ cf scale my_app -i 1
+
+
+<div class="panel bg-neutral-11">
+ <div class="row">
+ <div class="col-md-12 col col-md-offset-6 col-sm-24 col-sm-offset-0">
+ <svg class="scale-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 531.415 353.659" preserveAspectRatio="xMinYMin meet" enable-background="new 0 0 531.415 353.659" xml:space="preserve">
+ <polygon fill="url(#bg-gradient)" points="8.33,299.979 70.081,247.747 143.06,235.539 186.568,180.328 240.571,149.701 288.082,110.127 351.705,84.419 432.399,75.015 527.396,4.019 527.396, 299.979 8.33,299.979"/>
+ <polyline fill="none" stroke="#D4D9DA" stroke-width="4.0103" stroke-miterlimit="10" points="8.33,299.979 70.081,247.747 143.06,235.539 186.568,180.328 240.571,149.701 288.082,110.127 351.705,84.419 432.399,75.015 527.396,4.019 "/>
+ <ellipse fill="#D4D9DA" cx="8.33" cy="299.979" rx="4.019" ry="4.039"/>
+ <ellipse fill="#D4D9DA" cx="69.568" cy="247.981" rx="4.019" ry="4.039"/>
+ <ellipse fill="#D4D9DA" cx="142.987" cy="234.989" rx="4.019" ry="4.039"/>
+ <ellipse fill="#D4D9DA" cx="186.935" cy="180.42" rx="4.019" ry="4.039"/>
+ <ellipse fill="#D4D9DA" cx="240.633" cy="149.178" rx="4.019" ry="4.039"/>
+ <ellipse fill="#D4D9DA" cx="289.064" cy="110.116" rx="4.019" ry="4.039"/>
+ <ellipse fill="#D4D9DA" cx="351.213" cy="84.598" rx="4.019" ry="4.039"/>
+ <ellipse fill="#D4D9DA" cx="432.796" cy="74.253" rx="4.019" ry="4.039"/>
+ <circle fill="#D4D9DA" cx="527.396" cy="4.019" r="4.019"/>
+
+ <text transform="matrix(1 0 0 1 0 347.8439)" fill="#8E8F8E" font-family="'SourceSansPro'" font-size="18">
+ Instances
+ </text>
+ <g class="instances-column selected-group" id="instances-1" filter="url(#desaturate-filter)">
+ <rect x="40" y="0" height="530" width="130" opacity="0" />
+ <text transform="matrix(1 0 0 1 105.1135 347.8439)" fill="#00A69E" font-family="'SourceSansPro'" font-size="18">
+ 1
+ </text>
+ <path fill="#00A69E" d="M105.96 291.558l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L105.96 291.558z"/>
+ <path fill="#3F4950" d="M80.129 279.625v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L80.129 279.625z"/>
+ <path fill="#525D64" d="M131.001 278.331l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C132.209 278.859 131.726 278.475 131.001 278.331z"/>
+ </g>
+
+ <g class="instances-column" id="instances-4" filter="url(#desaturate-filter)">
+ <rect x="170" y="0" height="530" width="120" opacity="0" />
+ <text transform="matrix(1 0 0 1 224.4272 347.8439)" fill="#00A69E" font-family="'SourceSansPro'" font-size="18">
+ 4
+ </text>
+ <path fill="#00A69E" d="M228.811 291.558l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L228.811 291.558z"/>
+ <path fill="#3F4950" d="M202.98 279.625v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L202.98 279.625z"/>
+ <path fill="#525D64" d="M253.853 278.331l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C255.06 278.859 254.577 278.475 253.853 278.331z"/>
+ <path fill="#00A69E" d="M228.811 255.697l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L228.811 255.697z"/>
+ <path fill="#3F4950" d="M202.98 243.765v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L202.98 243.765z"/>
+ <path fill="#525D64" d="M253.853 242.47l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C255.06 242.999 254.577 242.615 253.853 242.47z"/>
+ <path fill="#00A69E" d="M228.811 219.837l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L228.811 219.837z"/>
+ <path fill="#3F4950" d="M202.98 207.905v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L202.98 207.905z"/>
+ <path fill="#525D64" d="M253.853 206.61l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C255.06 207.138 254.577 206.755 253.853 206.61z"/>
+ <path fill="#00A69E" d="M228.811 183.977l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L228.811 183.977z"/>
+ <path fill="#3F4950" d="M202.98 172.044v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L202.98 172.044z"/>
+ <path fill="#525D64" d="M253.853 170.75l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C255.06 171.278 254.577 170.894 253.853 170.75z"/>
+
+ </g>
+ <g class="instances-column" id="instances-6" filter="url(#desaturate-filter)">
+ <rect x="290" y="0" height="530" width="130" opacity="0" />
+ <text transform="matrix(1 0 0 1 347.2788 347.8439)" fill="#00A69E" font-family="'SourceSansPro'" font-size="18">
+ 6
+ </text>
+ <path fill="#00A69E" d="M351.125 291.558l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L351.125 291.558z"/>
+ <path fill="#3F4950" d="M325.294 279.625v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L325.294 279.625z"/>
+ <path fill="#525D64" d="M376.167 278.331l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C377.374 278.859 376.891 278.475 376.167 278.331z"/>
+ <path fill="#00A69E" d="M351.125 255.697l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L351.125 255.697z"/>
+ <path fill="#3F4950" d="M325.294 243.765v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L325.294 243.765z"/>
+ <path fill="#525D64" d="M376.167 242.47l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C377.374 242.999 376.891 242.615 376.167 242.47z"/>
+ <path fill="#00A69E" d="M351.125 219.837l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L351.125 219.837z"/>
+ <path fill="#3F4950" d="M325.294 207.905v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L325.294 207.905z"/>
+ <path fill="#525D64" d="M376.167 206.61l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C377.374 207.138 376.891 206.755 376.167 206.61z"/>
+ <path fill="#00A69E" d="M351.125 183.977l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L351.125 183.977z"/>
+ <path fill="#3F4950" d="M325.294 172.044v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L325.294 172.044z"/>
+ <path fill="#525D64" d="M376.167 170.75l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C377.374 171.278 376.891 170.894 376.167 170.75z"/>
+ <path fill="#00A69E" d="M351.125 148.116l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L351.125 148.116z"/>
+ <path fill="#3F4950" d="M325.294 136.184v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L325.294 136.184z"/>
+ <path fill="#525D64" d="M376.167 134.889l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C377.374 135.417 376.891 135.034 376.167 134.889z"/>
+ <path fill="#00A69E" d="M351.125 112.332l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L351.125 112.332z"/>
+ <path fill="#3F4950" d="M325.294 100.399v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L325.294 100.399z"/>
+ <path fill="#525D64" d="M376.167 99.105l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C377.374 99.633 376.891 99.249 376.167 99.105z"/>
+ </g>
+ <g class="instances-column another-class" id="instances-8" filter="url(#desaturate-filter)">
+ <rect x="420" y="0" height="530" width="130" opacity="0" />
+
+ <text transform="matrix(1 0 0 1 470.1294 347.8439)" fill="#00A69E" font-family="'SourceSansPro'" font-size="18">
+ 8
+ </text>
+ <path fill="#00A69E" d="M474.514 291.558l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L474.514 291.558z"/>
+ <path fill="#3F4950" d="M448.683 279.625v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 279.625z"/>
+ <path fill="#525D64" d="M499.555 278.331l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 278.859 500.28 278.475 499.555 278.331z"/>
+ <path fill="#00A69E" d="M474.514 255.697l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L474.514 255.697z"/>
+ <path fill="#3F4950" d="M448.683 243.765v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 243.765z"/>
+ <path fill="#525D64" d="M499.555 242.47l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 242.999 500.28 242.615 499.555 242.47z"/>
+ <path fill="#00A69E" d="M474.514 219.837l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L474.514 219.837z"/>
+ <path fill="#3F4950" d="M448.683 207.905v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 207.905z"/>
+ <path fill="#525D64" d="M499.555 206.61l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 207.138 500.28 206.755 499.555 206.61z"/>
+ <path fill="#00A69E" d="M474.514 183.977l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L474.514 183.977z"/>
+ <path fill="#3F4950" d="M448.683 172.044v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 172.044z"/>
+ <path fill="#525D64" d="M499.555 170.75l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 171.278 500.28 170.894 499.555 170.75z"/>
+ <path fill="#00A69E" d="M474.514 148.116l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L474.514 148.116z"/>
+ <path fill="#3F4950" d="M448.683 136.184v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 136.184z"/>
+ <path fill="#525D64" d="M499.555 134.889l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 135.417 500.28 135.034 499.555 134.889z"/>
+ <path fill="#00A69E" d="M474.514 112.332l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958v-10.625L474.514 112.332z"/>
+ <path fill="#3F4950" d="M448.683 100.399v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 100.399z"/>
+ <path fill="#525D64" d="M499.555 99.105l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 99.633 500.28 99.249 499.555 99.105z"/>
+ <path fill="#00A69E" d="M474.514 76.395l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958V71.196L474.514 76.395z"/>
+ <path fill="#3F4950" d="M448.683 64.463v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 64.463z"/>
+ <path fill="#525D64" d="M499.555 63.168l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 63.696 500.28 63.313 499.555 63.168z"/>
+ <path fill="#00A69E" d="M474.514 40.535l-25.831-5.199v10.625c0 0.43 0.483 0.813 1.208 0.958l24.221 4.836c0.396 0.079 0.828 0.079 1.224 0l24.221-4.836c0.724-0.145 1.208-0.528 1.208-0.958V35.336L474.514 40.535z"/>
+ <path fill="#3F4950" d="M448.683 28.603v7.354l25.454 5.123c0.249 0.05 0.505 0.05 0.754 0.001l25.872-5.124v-7.432l-25.875 5.125c-0.247 0.049-0.501 0.049-0.748 0L448.683 28.603z"/>
+ <path fill="#525D64" d="M499.555 27.308l-24.22-4.836c-0.404-0.081-0.82-0.081-1.224 0l-24.22 4.836c-0.724 0.145-1.208 0.528-1.208 0.958v0.337l25.457 5.047c0.247 0.049 0.501 0.049 0.748 0l25.875-5.125v-0.259C500.763 27.836 500.28 27.453 499.555 27.308z"/>
+ </g>
+
+ <filter id="desaturate-filter" >
+ <feColorMatrix in="SourceGraphic"
+ type="saturate"
+ values="0" />
+ </filter>
+
+ <linearGradient id="bg-gradient" x1="0" x2="1" y1="0" y2="1">
+ <stop class="instances-gradient-stop-1" offset="0%"/>
+ <stop class="instances-gradient-stop-2" offset="90%"/>
+ </linearGradient>
+ </svg>
+ </div>
+ </div>
+</div>
+
+<div>
+<pre class="language-bash scale-code">
+<code>
+ $ cf scale my_app -i <span class="instance-count">1</span>
+</code>
+</pre>
+</div>
+
Media
+ + +The default media displays a media object (images, video, audio) to the left or right of a content block.
Media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +Media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. +.media
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/64x64"}
+ .media-body
+ %h4.media-heading Media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+
+.media
+ .media-body
+ %h4.media-heading Media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+ %a.media-right{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/64x64"}
+
Wrap the image in a fixed-size .image-container
to make sure the image isn't
+larger than the container
Media heading
++ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +
+.media
+ %a.media-left{:href => "#"}
+ .image-container{style: "width: 100px; height: 50px;"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/64x64"}
+ .media-body
+ %h4.media-heading Media heading
+ %p
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+
You can also nest media objects inside of each other (useful for comment threads or articles lists).
Media heading
+Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+ +Nested media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. + +Nested media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. +Nested media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. +
+.media
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/64x64"}
+ .media-body
+ %h4.media-heading Media heading
+ %p Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+
+ / Nested media object
+ .media
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/64x64"}
+ .media-body
+ %h4.media-heading Nested media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+
+ / Nested media object
+ .media
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/64x64"}
+ .media-body
+ %h4.media-heading Nested media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+
+ / Nested media object
+ .media
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/64x64"}
+ .media-body
+ %h4.media-heading Nested media heading
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+
Alignment
+The images or other media can be aligned top, middle, or bottom. The default is top aligned.
Top aligned media
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +Middle aligned media
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +Bottom aligned media
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. +.media
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/40x40"}
+ .media-body
+ %h4.media-heading Top aligned media
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+
+.media
+ %a.media-left.media-middle{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/40x40"}
+ .media-body
+ %h4.media-heading Middle aligned media
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+
+.media
+ %a.media-left.media-bottom{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/40x40"}
+ .media-body
+ %h4.media-heading Bottom aligned media
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+
Stackable
+You can also make the media block stack with grid columns.
+Media objects switch from being stacked on top to being floated left of the media body as the screen size gets larger.
+For example, .media-stackable-xs
is stacked on screen sizes from 0-480px and then left floated on larger screens.
Extra-small stackable
+Small stackable
+Medium stackable
+Large stackable
+.media.media-stackable-xs
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/100x100"}
+ .media-body
+ %p Extra-small stackable
+
+.media.media-stackable-sm
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/100x100"}
+ .media-body
+ %p Small stackable
+
+.media.media-stackable-md
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/100x100"}
+ .media-body
+ %p Medium stackable
+
+.media.media-stackable-lg
+ %a.media-left{:href => "#"}
+ %img.media-object{:alt => "...", :src => "http://placehold.it/100x100"}
+ .media-body
+ %p Large stackable
+
Modals
+Modals bring desired content to the foreground and de-emphasize the rest of the page.
+ ++
+ + + + + + + + +Panes
+Panes are horizontal groupings of content that are usually used to +span the full browser window width. It's going to look funny here, +a better way to view it is on the panes page.
You can combine up to two background classes on the pane component.
+The one on the .pane
element will span the full browser width. The
+one on the .container
element will be constrained to the content width.
This is a pane
+<div class="pane bg-dark-1">
+ <div class="container bg-glow">
+ <h1 class="type-neutral-11">This is a pane</h1>
+ </div>
+</div>
+
+
This is a pane
+This is another pane
+<div class="pane pane-offset bg-dark-1">
+ <div class="container bg-glow">
+ <h1 class="type-neutral-11">This is a pane</h1>
+ <div class="pane-image">
+ <img class="img-responsive" src="../images/console-laptop.png" alt="A laptop showing Pivotal Web Services dashboard." />
+ </div>
+ </div>
+</div>
+<div class="pane bg-cloud">
+ <div class="container">
+ <h1>This is another pane</h1>
+ </div>
+</div>
+
+
Panels
+ +-
+
- Simple +
- Basic +
- Flex (Panel with Footer) +
- Tile +
- Scrollable +
- Highlight +
- Alternate +
- Shadow +
- Card +
- Clickable +
Panels are often used to group related content. They include box headers, footers, and can be combined with any backgrounds.
Panels are typically a combination of contours, backgrounds, and content including headers and footers. This section describes the contours.
+Alternate
+Alternate panels can be in a default, off, or danger state.
+
+
+ Alternate Panel
+
+ | .panel.panel-alt
+ .panel-body
+ Alternate Panel |
---|---|
+
+
+ Danger alternate panel
+
+ | .panel.panel-alt.panel-danger
+ .panel-body
+ Danger alternate panel |
+
+
+ Stopped alternate panel
+
+ | .panel.panel-alt.panel-off
+ .panel-body
+ Stopped alternate panel |
+
+
+ Off alternate panel
+
+ | .panel.panel-alt.panel-empty
+ .panel-body
+ Off alternate panel |
+
+
+ Editing alternate panel
+
+ | .panel.panel-alt.panel-editing
+ .panel-body
+ Editing alternate panel
+ |
Basic
+Basic Panels are the new Simple Panels for G-Major
.panel.panel-basic.bg-neutral-11
+ .panel-body
+ Basic Panel
+
Card
+Using panels with card lists makes any .panel-body
have a minimum "card" height.
-
+
-
+ + Card Panel ++
+
-
+ + Card Panel ++
+
-
+ + Card Panel ++
+
%ul.list-cards.list-cards-sm.list-card-2
+ %li.panel.panel-clickable-alt.bg-neutral-11
+ .panel-body
+ Card Panel
+ %li.panel.panel-clickable-alt.bg-neutral-11
+ .panel-body
+ Card Panel
+ %li.panel.panel-clickable-alt.bg-neutral-11
+ .panel-body
+ Card Panel
+
Clickable
+These panels lighten on hover to indicate that they are clickable. +Please use them when a click on the panel triggers an action.
+
+
+ Panel Clickable
+
+ | .panel.panel-clickable
+ .panel-body
+ Panel Clickable |
---|---|
+
+
+ Panel Clickable Alt
+
+ | .panel.panel-clickable-alt
+ .panel-body
+ Panel Clickable Alt
+ |
Sometimes you'll also want to adapt the way child elements look +based on a hover on the parent element. There are a few +helper classes for that.
%a.panel.panel-clickable
+ .panel-body
+ %p.hover-target-1
+ hover-target-1 - default text color => link color | |
%a.panel.panel-clickable
+ .panel-body
+ %p.hover-target-2
+ hover-target-2 - light gray text => default text color | |
%a.panel.panel-clickable
+ .panel-body
+ %p.hover-target-3
+ hover-target-3 - $gray-9 background => white background
+ |
Flex (Panel with Footer)
+Flex panels let us put a footer at the bottom of a fixed-height panel. Any panel can flex. In browsers that don't +support flexbox, the footer will appear where it would naturally, likely right below the panel-body content.
By default, flex panels have no height. You must use an inline style to set the height.
<div class="panel panel-flex bg-neutral-11" style="height:200px">
+ <div class="panel-body">Body Content</div>
+ <div class="panel-footer">Footer Content</div>
+</div>
+
+ Flex panels and list cards +
+
+ Flex panels are often used with list cards
+ as a way to give list cards footers.
+ Add the class list-card-wrapper
on any flex panels inside list cards.
+
-
+
-
+ ++Body Content+ +
+
+
- + + + +
-
+
+ ++ +Or in a link!+ +
+
<ul class="list-cards list-card-2 list-cards-sm">
+ <li class="panel panel-flex bg-neutral-11">
+ <div class="list-card-wrapper panel panel-flex">
+ <div class="panel-body">Body Content</div>
+ <div class="panel-footer">Footer Content</div>
+ </div>
+ </li>
+
+ <li class="panel panel-flex bg-neutral-11">
+ <form>
+ <div class="list-card-wrapper panel panel-flex">
+ <div class="panel-body">
+ <p>
+ It even works if your <code>list-card-wrapper</code> is nested in a form
+ </p>
+ <div class="form-group">
+ <input class="form-control" placeholder="Email">
+ </div>
+ </div>
+ <div class="panel-footer">Footer Content</div>
+ </div>
+ </form>
+ </li>
+
+ <li class="panel panel-flex bg-neutral-11">
+ <a class="list-card-link" href="http://wrd.cm/1e2A8uU">
+ <div class="list-card-wrapper panel panel-flex">
+ <div class="panel-body">Or in a link!</div>
+ <div class="panel-footer">Footer Content</div>
+ </div>
+ </a>
+ </li>
+</ul>
+
Highlight
+This panel is used to highlight more important parts of the page.
.panel.panel-highlight
+ .panel-body
+ Not Hoverable (use when the panel has no associated action, for instance if the action is disabled due to lack of permissions)
+
Scrollable
+The scrollable panel sets a fixed height of 183px and scrolls any content that is larger. If you want a different size, set an inline style on the .panel-scrollable
.
Lo-fi fixie aute irony skateboard, officia pug. VHS Kickstarter semiotics elit ad. XOXO fashion axe Neutra aesthetic nihil, before they sold out seitan photo booth bitters paleo ea. XOXO mustache consectetur jean shorts wolf banh mi, food truck aute odio Neutra polaroid artisan mlkshk. Chillwave aesthetic hashtag, 3 wolf moon Neutra umami DIY swag eu veniam. Blue Bottle fap kale chips veniam kogi, placeat yr Portland nesciunt sustainable iPhone. Single-origin coffee messenger bag locavore Schlitz, ea farm-to-table aliquip anim umami master cleanse. Delectus selfies placeat, tilde hoodie qui selvage consectetur cred master cleanse readymade pop-up assumenda nisi. Eu deep v brunch McSweeney's. Raw denim aliquip Banksy, proident cred banjo qui placeat Brooklyn fashion axe crucifix normcore aesthetic. Esse Pinterest organic anim American Apparel, wolf next level Tumblr laboris normcore pop-up dolore lo-fi put a bird on it trust fund. Laborum organic authentic Williamsburg plaid, Wes Anderson dolore sunt chia small batch synth Carles cliche tilde. Food truck ethical freegan velit, Kickstarter semiotics labore American Apparel biodiesel street art gentrify trust fund. Selfies Austin ex, organic art party authentic ullamco kitsch plaid placeat roof party cornhole deserunt aute.
+.panel.panel-scrollable.bg-neutral-11
+ .panel-body
+ %p Lo-fi fixie aute irony skateboard, officia pug. VHS Kickstarter semiotics elit ad. XOXO fashion axe Neutra aesthetic nihil, before they sold out seitan photo booth bitters paleo ea. XOXO mustache consectetur jean shorts wolf banh mi, food truck aute odio Neutra polaroid artisan mlkshk. Chillwave aesthetic hashtag, 3 wolf moon Neutra umami DIY swag eu veniam. Blue Bottle fap kale chips veniam kogi, placeat yr Portland nesciunt sustainable iPhone. Single-origin coffee messenger bag locavore Schlitz, ea farm-to-table aliquip anim umami master cleanse. Delectus selfies placeat, tilde hoodie qui selvage consectetur cred master cleanse readymade pop-up assumenda nisi. Eu deep v brunch McSweeney's. Raw denim aliquip Banksy, proident cred banjo qui placeat Brooklyn fashion axe crucifix normcore aesthetic. Esse Pinterest organic anim American Apparel, wolf next level Tumblr laboris normcore pop-up dolore lo-fi put a bird on it trust fund. Laborum organic authentic Williamsburg plaid, Wes Anderson dolore sunt chia small batch synth Carles cliche tilde. Food truck ethical freegan velit, Kickstarter semiotics labore American Apparel biodiesel street art gentrify trust fund. Selfies Austin ex, organic art party authentic ullamco kitsch plaid placeat roof party cornhole deserunt aute.
+
Shadow
+Shadow panels add a bottom shadow to the panel.
+
+
+ Shadow Panel
+
+ | .panel.panel-shadow-1.bg-neutral-11
+ .panel-body
+ Shadow Panel |
---|---|
+
+
+ Shadow Panel
+
+ | .panel.panel-shadow-2.bg-neutral-11
+ .panel-body
+ Shadow Panel |
+
+
+ Shadow Panel
+
+ | .panel.panel-shadow-3.bg-neutral-11
+ .panel-body
+ Shadow Panel |
+
+
+ Shadow Panel
+
+ | .panel.panel-shadow-4.bg-neutral-11
+ .panel-body
+ Shadow Panel |
Simple
+.panel.panel-simple.bg-neutral-11
+ .panel-body
+ Simple Panel
+
Tile
+Tile panels extend the behavior of flex panels. They provide an animated footer on hover, at the bottom of a fixed-height panel.
<ul class="list-cards list-card-1 list-cards-lg">
+ <li>
+ <a class="list-cards-link panel panel-flex panel-tile bg-neutral-11" href="http://www.google.com/">
+ <div class="panel-body">
+ Hover to see secondary state.
+ </div>
+ <div class="panel-footer">
+ This is the footer
+ </div>
+ </a>
+ </li>
+</ul>
+
Similar to the regular responsive classes, use these for toggling content for print.
+Classes | +Browser | +|
---|---|---|
+ .visible-print-block + .visible-print-inline + .visible-print-inline-block
+ |
+ Hidden | +Visible | +
.hidden-print |
+ Visible | +Hidden | +
Progress Bars
+This section contains static progress bar styles.
+ 0 MB of 100 MB Used +
++ 3 MB of 100 MB Used +
++ 9 MB of 100 MB Used +
++ 60 MB of 100 MB Used +
++ 90 MB of 100 MB Used +
+.progress
+ .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "0", :role => "progressbar", :style => "width: 0%;"}
+ .label
+ 0%
+%p
+ 0 MB of 100 MB Used
+
+.progress
+ .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "3", :role => "progressbar", :style => "width: 3%;"}
+ .label
+ 3%
+%p
+ 3 MB of 100 MB Used
+
+.progress
+ .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "9", :role => "progressbar", :style => "width: 9%;"}
+ .label
+ 9%
+%p
+ 9 MB of 100 MB Used
+
+.progress
+ .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "60", :role => "progressbar", :style => "width: 60%;"}
+ .label
+ 60%
+%p
+ 60 MB of 100 MB Used
+
+.progress
+ .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "90", :role => "progressbar", :style => "width: 90%;"}
+ .label
+ 90%
+%p
+ 90 MB of 100 MB Used
+
Responsive Utilities
+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 | +Hidden | +Hidden | +Hidden | +
.visible-sm-* |
+ Hidden | +Visible | +Hidden | +Hidden | +
.visible-md-* |
+ Hidden | +Hidden | +Visible | +Hidden | +
.visible-lg-* |
+ Hidden | +Hidden | +Hidden | +Visible | +
.hidden-xs |
+ Hidden | +Visible | +Visible | +Visible | +
.hidden-sm |
+ Visible | +Hidden | +Visible | +Visible | +
.hidden-md |
+ Visible | +Visible | +Hidden | +Visible | +
.hidden-lg |
+ Visible | +Visible | +Visible | +Hidden | +
The .visible-*-*
classes for each breakpoint come in three variations, one for each CSS display property value listed below.
Group of classes | +CSS display | +
---|---|
.visible-*-block |
+ display: block; |
+
.visible-*-inline |
+ display: inline; |
+
.visible-*-inline-block |
+ display: inline-block; |
+
So, for extra small (xs
) screens for example, the available .visible-*-*
classes are:
.visible-xs-block
+.visible-xs-inline
+.visible-xs-inline-block
+
Ribbons
+ + +Ribbons should be used to call out access, status, enironment, etc.
+Banner
+You can use a banner ribbon to let the team know which environment they're
+working on. Leave off the .styleguide-component-wrapper
div when using it
+in other contexts.
.styleguide-component-wrapper
+ .ribbon-banner
+ Acceptance
+
Colors
+British | <div class="inline-ribbon">British</div> |
---|---|
Pivotal
+ | <div class="inline-ribbon ribbon-primary">Pivotal</div>
+ |
Inline
+<div class="inline-ribbon">
+ British
+</div>
+<span class="mlm">For British eyes only</span>
+
Tabs
+ +-
+
- Highlight +
- Simple +
- Simple Alt +
- Responsive +
- Image +
You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab"
on an element.
Highlight
+Service Plans
+ +Plan Features
+.tab-highlight
+ .row
+ .col-md-8
+ %h1 Service Plans
+ %ul.nav.nav-stacked
+ %li.active
+ %a{"data-toggle" => "tab", :href => "#home"}
+ .row
+ .col-md-10.tab-title
+ Spark
+ .col-md-14
+ Free
+ %li
+ %a{"data-toggle" => "tab", :href => "#profile"}
+ .row
+ .col-md-10.tab-title
+ Boost
+ .col-md-14
+ $10/month
+ %li
+ %a{"data-toggle" => "tab", :href => "#messages"}
+ .row
+ .col-md-10.tab-title
+ Amp
+ .col-md-14
+ $50/month
+ %li
+ %a{"data-toggle" => "tab", :href => "#settings"}
+ .row
+ .col-md-10.tab-title
+ Shockingly long plan name is important to test
+ .col-md-14
+ $1000/month
+
+ .col-md-16
+ %h1 Plan Features
+ .tab-content
+ #home.tab-pane.fade.in.active Content 1
+ #profile.tab-pane.fade Content 2
+ #messages.tab-pane.fade Content 3
+ #settings.tab-pane.fade Content 4
+
Image
+You can use any 130px by 130px svg for the icon in the center of the tab. Please add the class icon
to any parts of the svg which form part of the icon. You may also use an icon font for the icon.
-
+
- + + Agility + + + +
- + + Choice + + + +
- + + Open Source + + + +
<div class="tabs-images">
+ <ul class="list-inline nav-tabs-images">
+ <li class="active">
+ <a data-toggle="tab" href="#agility">
+ <span class="sr-only">Agility</span>
+ <svg class="icon-svg" x="0px" y="0px" height="130" width="130" enable-background="new 0 0 130 130" >
+ <g>
+ <path class="icon" d="M97.283,83.157H86.452c-2.555,3.305-5.781,6.066-9.478,8.067h20.31l4.489-3.945L97.283,83.157z"/>
+ <path class="icon" d="M62.788,38.586c-14.513,0-26.319,11.807-26.319,26.319c0,5.429,1.66,10.473,4.489,14.667h11.012
+ c-4.499-3.327-7.434-8.654-7.434-14.667c0-10.064,8.188-18.252,18.252-18.252S81.04,54.84,81.04,64.905
+ c0,6.013-2.935,11.34-7.434,14.667c-3.032,2.242-6.766,3.585-10.818,3.585H43.853h-4.729H28.292l4.482,4.122l-4.482,3.945h20.311
+ h14.185c7.43,0,14.145-3.099,18.935-8.067c1.066-1.106,2.033-2.308,2.895-3.585c2.83-4.194,4.489-9.238,4.489-14.667
+ C89.107,50.393,77.301,38.586,62.788,38.586z"/>
+ </g>
+ </svg>
+ </a>
+ </li>
+ <li>
+ <a data-toggle="tab" href="#choice">
+ <span class="sr-only">Choice</span>
+ <svg class="icon-svg" version="1.1" x="0px" y="0px"
+ viewBox="0 0 130 130" enable-background="new 0 0 130 130" xml:space="preserve">
+ <g>
+ <g>
+ <path class="icon" d="M59.642,57.905c0,1.65-1.35,3-3,3h-18c-1.65,0-3-1.35-3-3v-18c0-1.65,1.35-3,3-3h18c1.65,0,3,1.35,3,3V57.905z"/>
+ </g>
+ <g>
+ <path class="icon" d="M78.381,60.905c-1.65,0-3.675-1.169-4.5-2.598l-3.928-6.804c-0.825-1.429-0.825-3.767,0-5.196l3.928-6.804
+ c0.825-1.429,2.85-2.598,4.5-2.598h7.856c1.65,0,3.675,1.169,4.5,2.598l3.928,6.804c0.825,1.429,0.825,3.767,0,5.196l-3.928,6.804
+ c-0.825,1.429-2.85,2.598-4.5,2.598H78.381z"/>
+ </g>
+ <circle class="icon" cx="82.309" cy="79.905" r="12"/>
+ <g>
+ <path class="icon" d="M46.202,70.399c0.792-1.372,2.088-1.372,2.88,0l3.77,6.531c0.792,1.372,2.088,3.616,2.88,4.988l3.77,6.531
+ c0.792,1.372,0.144,2.494-1.44,2.494h-7.541c-1.584,0-4.175,0-5.759,0h-7.541c-1.584,0-2.232-1.122-1.44-2.494l3.77-6.531
+ c0.792-1.372,2.088-3.616,2.88-4.988L46.202,70.399z"/>
+ </g>
+ </g>
+ </svg>
+ </a>
+ </li>
+ <li>
+ <a data-toggle="tab" href="#open-source">
+ <span class="sr-only">Open Source</span>
+ <svg class="icon-svg" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 130 130" enable-background="new 0 0 130 130">
+ <path class="icon" d="M95.22,65.454c0-16.583-13.441-30.025-30.024-30.025c-16.583,0-30.026,13.442-30.026,30.025
+ c0,12.68,7.861,23.525,18.973,27.926l7.596-19.192c-3.477-1.377-5.937-4.767-5.937-8.734c0-5.188,4.207-9.393,9.394-9.393
+ c5.188,0,9.395,4.206,9.395,9.393c0,3.966-2.463,7.357-5.937,8.734l7.594,19.192C87.362,88.979,95.22,78.134,95.22,65.454z"/>
+ </svg>
+ </a>
+ </li>
+ </ul>
+ <div class="tab-content txt-c">
+ <div class="tab-pane fade in active" id="agility">Agility Content</div>
+ <div class="tab-pane fade" id="choice">Choice Content</div>
+ <div class="tab-pane fade" id="open-source">Open Source</div>
+ </div>
+</div>
+
+
Responsive
+.tab-responsive
+ .row
+ .col-sm-5
+ %ul.nav.hidden-xs
+ %li.active
+ %a{"data-toggle" => "tab", :href => "#tab-responsive-1"}
+ meep
+ %li
+ %a{"data-toggle" => "tab", :href => "#tab-responsive-2"}
+ foo
+ %li
+ %a{"data-toggle" => "tab", :href => "#tab-responsive-3"}
+ bar
+ %li
+ %a{"data-toggle" => "tab", :href => "#tab-responsive-4"}
+ baz
+
+ .col-sm-19
+ %ul.tab-content
+ %li.active
+ %a.visible-xs-block{"data-toggle" => "tab", :href => "#tab-responsive-1"}
+ meep
+ %li#tab-responsive-1.tab-pane.active.fade.in Content 1
+ %li
+ %a.visible-xs-block{"data-toggle" => "tab", :href => "#tab-responsive-2"}
+ foo
+ %li#tab-responsive-2.tab-pane.fade Content 2
+ %li
+ %a.visible-xs-block{"data-toggle" => "tab", :href => "#tab-responsive-3"}
+ foo
+ %li#tab-responsive-3.tab-pane.fade Content 3
+ %li
+ %a.visible-xs-block{"data-toggle" => "tab", :href => "#tab-responsive-4"}
+ foo
+ %li#tab-responsive-4.tab-pane.fade Content 4
+
+
Simple
+.tab-simple
+ .tabs-action.txt-r
+ %a Some Action
+ %ul.nav.nav-tabs
+ %li.active
+ %a{"data-toggle" => "tab", :href => "#spaces"}Spaces
+ %li
+ %a{"data-toggle" => "tab", :href => "#domains"}Domains
+ %li
+ %a{"data-toggle" => "tab", :href => "#members"}Members
+
+
+ .tab-content
+ #spaces.tab-pane.fade.in.active Spaces Content
+ #domains.tab-pane.fade Domains Content
+ #members.tab-pane.fade Members Content
+
+
Simple Alt
+.tab-simple-alt
+ %ul.nav.nav-tabs
+ %li.active
+ %a{"data-toggle" => "tab", :href => "#dashboard"}Dashboard
+ %li
+ %a{"data-toggle" => "tab", :href => "#notifications"}Notifications
+ %li
+ %a{"data-toggle" => "tab", :href => "#eula"}EULA
+
+
+ .tab-content
+ #dashboard.tab-pane.fade.in.active Dashboard Content
+ #notifications.tab-pane.fade Notifications Content
+ #eula.tab-pane.fade EULA Content
+
+
Tables
+ +-
+
- Data +
- Key-Value +
- Alignment +
- Scrollable +
Class | +Description | +
---|---|
.table |
+Base table class, applies spacing and cross browser support. Unfortunately inherits some undesirable styles from bootstrap. | +
.table-hover |
+Adds a light blue background color to table rows when the user hovers over them (use to indicate clickability) | +
.table-striped |
+Applies zebra striping to a table. | +
Scrollable
+Table with borders where the contents of the table scroll but the header does not.
+The default height of the scrollable table is 183px. There are four other sizes provided
+which you can use by adding the following classes to the .table-scrollable
element.
Table Scrollable sizes | +Height | +
---|---|
default | +183px | +
.table-scrollable-sm |
+300px | +
.table-scrollable-md |
+600px | +
.table-scrollable-lg |
+900px | +
If you would like a custom size, please add an inline style to the .table-scrollable-body
element.
Design Note: The table-scrollable
is often paired with table-data
and table-light
as in our example.
+ You will need to specify the width of every column in both the thead
and
+ the first row of the tbody
. You can do this with inline width attributes.
+
# | +Status | +CPU | +Memory | +Disk | +Uptime | +
---|
0 | +Running | +0% | +4.16 MB | +6.75 MB | +27 min | +
1 | +Running | +0% | +4.07 MB | +6.75 MB | +27 min | +
2 | +Running | +0% | +4.07 MB | +6.75 MB | +25 min | +
3 | +Running | +0% | +4.14 MB | +6.75 MB | +25 min | +
4 | +Running | +0% | +4.08 MB | +6.75 MB | +25 min | +
5 | +Running | +0% | +4.16 MB | +6.75 MB | +25 min | +
6 | +Running | +0% | +4.07 MB | +6.75 MB | +25 min | +
7 | +Running | +0% | +4.07 MB | +6.75 MB | +25 min | +
8 | +Running | +0% | +4.03 MB | +6.75 MB | +25 min | +
9 | +Running | +0% | +4.07 MB | +6.75 MB | +25 min | +
<div class="table-scrollable table-scrollable-sm">
+ <div class="table-scrollable-header">
+ <table class="table table-data table-light">
+ <thead>
+ <tr>
+ <th width="10%">#</th>
+ <th width="16%">Status</th>
+ <th width="12%">CPU</th>
+ <th width="16%">Memory</th>
+ <th width="16%">Disk</th>
+ <th width="30%">Uptime</th>
+ </tr>
+ </thead>
+ </table>
+ </div>
+ <div class="table-scrollable-body">
+ <table class="table table-data table-light">
+ <tbody>
+ <tr>
+ <td width="10%">0</td>
+ <td width="16%">Running</td>
+ <td width="12%">0%</td>
+ <td width="16%">4.16 MB</td>
+ <td width="16%">6.75 MB</td>
+ <td width="30%">27 min</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.07 MB</td>
+ <td>6.75 MB</td>
+ <td>27 min</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.07 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.14 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.08 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.16 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.07 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.07 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.03 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Running</td>
+ <td>0%</td>
+ <td>4.07 MB</td>
+ <td>6.75 MB</td>
+ <td>25 min</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
Alignment
+See the alignment component for classes to use for table text alignment.
+Data
+This is a table used to display many rows of data (it is pretty much the default table). You can use grid column classes on th and td elements. See key-value table for example.
Design Note: The table-data
is often paired with table-light
as in our example.
+ Service Instance + | ++ Service Plan + | ++ Bound Apps + | +
---|---|---|
+ oracle-db-sct + | ++ Oracle DB + | ++ 12 + | +
+ oracle-db-sct + | ++ Oracle DB + | ++ 12 + | +
+ oracle-db-sct + | ++ Oracle DB + | ++ 12 + | +
+ oracle-db-sct + | ++ Oracle DB + | ++ 12 + | +
+%table.table.table-data.table-light
+ %thead
+ %tr
+ %th
+ Service Instance
+ %th
+ Service Plan
+ %th
+ Bound Apps
+ %tbody
+ %tr
+ %td
+ oracle-db-sct
+ %td
+ Oracle DB
+ %td
+ 12
+ %tr
+ %td
+ oracle-db-sct
+ %td
+ Oracle DB
+ %td
+ 12
+ %tr
+ %td
+ oracle-db-sct
+ %td
+ Oracle DB
+ %td
+ 12
+ %tr
+ %td
+ oracle-db-sct
+ %td
+ Oracle DB
+ %td
+ 12
+
Key-Value
+This table is used when the table headings are on the left. It looks better when you +specify column widths for the th/tds.
joe@example.com | +|
Current Password | +******* | +
First Name | +Joe | +
Last Name | +Bobs | +
Phone | +415-555-0000 | +
+%table.table.table-key-value
+ %tbody
+ %tr
+ %th.col-md-8 Email
+ %td.col-md-16 joe@example.com
+ %tr
+ %th.col-md-8 Current Password
+ %td.col-md-16 *******
+ %tr
+ %th.col-md-8 First Name
+ %td.col-md-16 Joe
+ %tr
+ %th.col-md-8 Last Name
+ %td.col-md-16 Bobs
+ %tr
+ %th.col-md-8 Phone
+ %td.col-md-16 415-555-0000
+
Tooltip
+Tooltips are used to display extra information on hover. They can be used with any hoverable element.
The title
attribute defines the text that appears on the tooltip.
+The data-placement
attribute defines the tooltip's placement.
+If data-placement
is not specified, the tooltip is placed on top by default.
+ Tooltips must be initialized with javascript: $(mySelector).tooltip();
+
+ Check out this + + tooltip on the left! + +
+ ++ Check out this + + tooltip on the right! + +
+ ++ +
+ ++ +
+<p>
+ Check out this
+ <a id="link-with-tooltip-1" href="#" data-toggle="tooltip" data-placement="left" title="I should be on the left">
+ tooltip on the left!
+ </a>
+</p>
+
+<p>
+ Check out this
+ <a id="link-with-tooltip-2" href="#" data-toggle="tooltip" data-placement="right" title="I should be on the right">
+ tooltip on the right!
+ </a>
+</p>
+
+<p>
+ <button id="button-with-tooltip-1" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="I should be on the top">
+ Check out this tooltip on the top!
+ </button>
+</p>
+
+<p>
+ <button id="button-with-tooltip-2" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="I should be on the bottom">
+ Check out this tooltip on the bottom!
+ </button>
+</p>
+
$('#link-with-tooltip-1').tooltip();
+$('#link-with-tooltip-2').tooltip();
+$('#button-with-tooltip-1').tooltip();
+$('#button-with-tooltip-2').tooltip();
+
+ If you want to use a tooltip on a disabled element, place the tooltip in a wrapper div with the class .button-with-tooltip-wrapper
.
+
<div id="disabled-button-with-tooltip" class="button-with-tooltip-wrapper" data-toggle="tooltip" data-placement="right" title="This button is totally disabled!">
+ <button type="button" class="btn btn-default" disabled=true>
+ Disabled button
+ </button>
+</div>
+
$('#disabled-button-with-tooltip').tooltip();
+
Typography
+ +-
+
- Alignment +
- Sizes +
- Emphasis Modifiers +
- Colors +
Source Sans Pro is our font family. +It can be used with the following modifiers to achieve a variety of effects.
+Sizes
+Set font sizes using headings and modifier classes.
h1.title 42px | <h1 class="title">h1.title 42px</h1> |
---|---|
h1 31px | <h1>h1 31px</h1> |
h2 25px | <h2>h2 25px</h2> |
h3 20px | <h3>h3 20px</h3> |
h4 18px | <h4>h4 18px</h4> |
h5 16px | <h5>h5 16px</h5> |
h6 13px | <h6>h6 13px</h6> |
base font size 16px | <p>base font size 16px</p> |
small text 14px | <p class="type-sm">small text 14px</p> |
extra small text 12px + | <p class="type-xs">extra small text 12px</p>
+ |
+ Separating code and visual semantics +
++ Sometimes you may need to use a heading which has different visual and code semantics. + You can accomplish this by combining classes with elements + (classes take visual precedence over elements in this case). +
+I am a h1! | <h1 class="h2">I am a h1!</h1> |
---|---|
I am a h2!+ | <h2 class="h1">I am a h2!</h2>
+ |
If it's not a heading but you need similar visual treatment you can add just the class to any element.
++ Use headings when possible since they add semantic value. +
+Heading level 2 on a div
+ | <div class="h2">Heading level 2 on a div</div>
+ |
---|
Alignment
+See the alignment component for classes to use for text alignment.
+Colors
+You can apply color to any text with the color classes.
I'm a brand color! + | <p class="type-brand-3">I'm a brand color!</p>
+ |
---|
Here's a table of all the color classes.
+ Type inverse |
+ Type inverse |
+ .type-inverse |
+
Type neutral 1 |
+ Type neutral 1 |
+ .type-neutral-1 |
+
Type neutral 1 |
+ Type neutral 1 |
+ .type-neutral-1 |
+
Type neutral 2 |
+ Type neutral 2 |
+ .type-neutral-2 |
+
Type neutral 3 |
+ Type neutral 3 |
+ .type-neutral-3 |
+
Type neutral 4 |
+ Type neutral 4 |
+ .type-neutral-4 |
+
Type neutral 5 |
+ Type neutral 5 |
+ .type-neutral-5 |
+
Type neutral 6 |
+ Type neutral 6 |
+ .type-neutral-6 |
+
Type neutral 7 |
+ Type neutral 7 |
+ .type-neutral-7 |
+
Type neutral 8 |
+ Type neutral 8 |
+ .type-neutral-8 |
+
Type neutral 9 |
+ Type neutral 9 |
+ .type-neutral-9 |
+
Type neutral 10 |
+ Type neutral 10 |
+ .type-neutral-10 |
+
Type neutral 11 |
+ Type neutral 11 |
+ .type-neutral-11 |
+
Type dark 1 |
+ Type dark 1 |
+ .type-dark-1 |
+
Type dark 2 |
+ Type dark 2 |
+ .type-dark-2 |
+
Type dark 3 |
+ Type dark 3 |
+ .type-dark-3 |
+
Type accent 1 |
+ Type accent 1 |
+ .type-accent-1 |
+
Type accent 2 |
+ Type accent 2 |
+ .type-accent-2 |
+
Type accent 3 |
+ Type accent 3 |
+ .type-accent-3 |
+
Type accent 4 |
+ Type accent 4 |
+ .type-accent-4 |
+
Type accent 5 |
+ Type accent 5 |
+ .type-accent-5 |
+
Type brand 1 |
+ Type brand 1 |
+ .type-brand-1 |
+
Type brand 2 |
+ Type brand 2 |
+ .type-brand-2 |
+
Type brand 3 |
+ Type brand 3 |
+ .type-brand-3 |
+
Type brand 4 |
+ Type brand 4 |
+ .type-brand-4 |
+
Type brand 5 |
+ Type brand 5 |
+ .type-brand-5 |
+
Type error 1 |
+ Type error 1 |
+ .type-error-1 |
+
Type error 2 |
+ Type error 2 |
+ .type-error-2 |
+
Type error 3 |
+ Type error 3 |
+ .type-error-3 |
+
Type error 4 |
+ Type error 4 |
+ .type-error-4 |
+
Type success 1 |
+ Type success 1 |
+ .type-success-1 |
+
Type success 2 |
+ Type success 2 |
+ .type-success-2 |
+
Type warn 1 |
+ Type warn 1 |
+ .type-warn-1 |
+
Type warn 2 |
+ Type warn 2 |
+ .type-warn-2 |
+
Type warn 3 |
+ Type warn 3 |
+ .type-warn-3 |
+
Emphasis Modifiers
+Type emphasis modifiers can be used on any type element.
Really Important++ I mean reeeeeeeeeeeally + + | <h1 class="em-high">Really Important</h1>
+<p>
+ I mean <span class="em-max">reeeeeeeeeeeally</span>
+</p>
+ |
---|
Here's a table of all the emphasis modifier classes.
Low emphasis | <h1 class="em-low">Low emphasis</h1> |
---|---|
Default emphasis | <h1 class="em-default">Default emphasis</h1> |
High emphasis | <h1 class="em-high">High emphasis</h1> |
Maximum emphasis | <h1 class="em-max">Maximum emphasis</h1> |
Emphasis alternate+ | <h1 class="em-alt">Emphasis alternate</h1>
+ |
Vertical Align
+The Aligner allows you to vertically align children to the top, center, or bottom. +Its height is set by default to 230px.
This component doesn't do any horizontal alignment.
+You can use grids, or the text-alignment classes
+.txt-l
, .txt-r
, and .txt-c
with this component.
+ This component is not supported in IE10 and below. + While the content will appear, it will not be vertically aligned. +
+<div class="aligner txt-c">
+ <a class="aligner-item" href="http://bitly.com/ZTHUDU">Centered content</a>
+</div>
+
Override the default height by setting an inline style like so:
<div class="aligner" style="height: 200px;">
+ <a class="aligner-item aligner-item-top" href="http://bit.ly/1wCDWdC">On Top</a>
+ <a class="aligner-item" href="http://bitly.com/ZTHUDU">Center</a>
+ <a class="aligner-item aligner-item-bottom" href="http://bit.ly/12TqYiL">Bottom</a>
+</div>
+
Note: the background colors in the example are just for display in the styleguide.
+Whitespace
+ + + +Standard
+Should be used to modify the default spacing between objects (not between nodes of the same object)
+Please use judiciously. You want to be using defaults most of the time, these are exceptions!
+<type><location><size>
Letter | +Description | +
---|---|
p, m | +padding, margin | +
a, t, r, b, l, h, v | +all, top, right, bottom, left, horizontal, vertical | +
n, s, m, l, xl, xxl, xxxl, xxxxl | +none(0px), small(5px), medium(7px), large(10px), extra large(20px), extra extra large (40px), extra extra extra large (120px), extra extra extra extra large (140px) | +
A normal paragraph
+A paragraph with large padding
+%p A normal paragraph
+%p.pal A paragraph with large padding
+
List
+See list spacing.