Utility Classes
A utility class applies a single rule or a very simple, universal pattern. Utility classes are simple, composable, and reusable. They will (intentionally) end up scattered throughout your markup.
All utility classes are prefixed with u-
.
Core Utilities
u-block
Use to create block level element.
u-inline-block
Use to create inline-block level element.
u-font-weight-normal
Use to force normal font weight.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-font-weight-bold
Use to force bold font weight. Optionally, use the <strong>
tag.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-overflow-hidden
Use to hide overflowing content. Resize browser and observe how the u-overflow-hidden
container hides content.
u-overflow-y-auto
Use to set overflow-y to auto
u-text-center
Use to center align text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-justify
Use to justify text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sed quam eget sapien consequat cursus eget pretium est. Maecenas porta tincidunt ullamcorper. Maecenas et pretium leo. Nam blandit imperdiet porta. Donec ante leo, aliquam at laoreet vel, laoreet nec nunc. Proin tincidunt efficitur libero, vitae consectetur dui consectetur quis.
u-text-left
Use to left align text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-right
Use to right align text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-small
Use for smaller text. Optionally, use <small>
for percentage based, smaller text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-base
Use to force base text size.
<h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</h3>
u-text-medium
Use for medium text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-large
Use for larger text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-break
Use to prevent long URLs from breaking out of container.
Prevent long urls http://www.likethislongwordybloviatingwebaddressrighthere.com from breaking out of container. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sed quam eget sapien consequat cursus eget pretium est. Maecenas porta tincidunt ullamcorper.
u-text-overflow
Use to truncate (ellipsis) overflowing text. Resize browser to observe.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sed quam eget sapien consequat cursus eget pretium est. Maecenas porta tincidunt ullamcorper.
u-text-underline
Use to underline text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-normal
Use to set normal font style.
Lorem ipsum this text is wrapped in u-text-normal, consectetur adipiscing elit.
u-text-italic
Use to force italic font style. Optionally, use <em>
tags.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
u-text-capitalize
Use to capitalize.
capitalize the first letter of every word in this paragraph
u-text-capitalize-first
Use to capitalize first letter only.
capitalize the first letter of first word in this paragraph
u-text-lowercase
Use to make lowercase.
ALL OF THIS TEXT IS LOWERCASE
u-text-uppercase
Use to make uppercase.
all of this text is uppercase
u-list
Use to remove default decoration from unordered/ordered lists.
- Item 1
- Item 2
- Item 3
u-list--numbers
Use to proivide an alternative style to ordered lists.
- Item 1
- Item 2
- Item 3
Color Utilities
u-bg-color
Use to set background color.
u-text-color
Used to set text color.
Flexbox Utilities
Most of our layout will be handled by our Flexbox grid system or within the CSS of complex components. However, we have included some helpful Flexbox utility classes to compliment our layout system and offer additional flexibility.
For a Flexbox refresher, see this CSS Tricks article.
Aligning Items
Align items in the cross axis of the current line of the flex container. Similar to 'justify-content' but in the perpendicular direction.
u-flex-align-items-baseline
u-flex-align-items-center
u-flex-align-items-end
u-flex-align-items-start
u-flex-align-items-stretch
Aligning Content
Aligns items within the flex container when there is extra space in the cross-axis. Has no effect when there is only one line of flex items. Requires that flex items are wrapping.
u-flex-align-content-start
u-flex-align-content-end
u-flex-align-content-center
u-flex-align-content-stretch
Aligning Self
Override default alignment of single item when specified by 'align-items.'
u-flex-align-self-auto
Inherits 'align-items' from parent container. In this case, the parent has align-items: flex-start
. Items one and two have align-self: flex-end
.
u-flex-align-self-center
u-flex-align-self-end
u-flex-align-self-start
u-flex-align-self-stretch
Flex Direction
u-flex-direction-column
u-flex-direction-column-reverse
u-flex-direction-row
u-flex-direction-row-reverse
Flex Display
u-flex
u-inline-flex
Flex Grow
Specify the flex grow factor, which determines how much the flex item will grow relative to the rest of the flex items in the flex container.
u-flex-grow-size (1-5)
Flex Justify
Align items along the main axis of the current line of the flex container.
u-flex-justify-around
u-flex-justify-between
u-flex-justify-center
u-flex-justify-end
u-flex-justify-start
Flex Order
Change order without editing underlying HTML.
u-flex-order-first
u-flex-order-last
u-flex-order-none
Flex Shrink
Specify the flex shrink factor, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container.
u-flex-shrink-size (0-3)
Flex Wrap
u-flex-nowrap
u-flex-wrap
u-flex-wrap-reverse
Flex items wrap upwards.
Spacing Utilities
Margins
Dark yellow areas represent margin. Use these utility classes to add or remove margin to page elements. We offer four (4) size options: small, default, medium, and large.
u-m-side-auto
Auto margin for a particlar side or sides.
u-m-side-0
Remove margin from a particlar side or sides.
u-m-a
Add margin around all sides.
u-m-t
Add top margin.
u-m-r
Add right margin.
u-m-b
Add bottom margin.
u-m-l
Add left margin.
u-m-x
Add left and right margin.
u-m-y
Add top and bottom margin.
Padding
Dark blue areas represent padding. Use these utility classes to add or remove padding to page elements. We offer four (4) size options: small, default, medium, and large.
u-p-side-0
Remove padding from a particlar side or sides.
u-p-a
Add padding around all sides.
u-p-t
Add top padding.
u-p-r
Add right padding.
u-p-b
Add bottom padding.
u-p-l
Add left padding.
u-p-x
Add left and right padding.
u-p-y
Add top and bottom padding.
Inline Grid
Variable-width content; like buttons and/or list items, can wrap at certain widths within our app when placed next to each other. We can use the u-inline-grid
class to provide adequate spacing.
Read more about this on the Utility Components page.
List
Create block-level lists that reset default<ul>
styles.
Read more about this on the Utility Components page.
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5