Alerts
Style user-feedback messages using one of the four contextual classes, .alert-success
, .alert-info
, .alert-warning
or .alert-danger
.
Optionally, you can also use the .alert-link
class to create complementary link colors.
Heads up! This alert needs your attention, but it’s not super important. Basically just an FYI for you…
Well done! You successfully read this important alert message, award yourself a hug.
Alert! Alert! Something might be about to happen so you have to make some decisions now. Not critical decisions, but decisions nonetheless. For more details click our placeholder anchor.
Well done! You successfully read this important alert message.
Example HTML
Buttons
Use button classes on an <a>
, <button>
, or button-like <input>
elements for consistent cross-browser styling.
Button colours
Use contextual button classes to quickly create buttons with meaning.
Active state
Buttons will appear pressed when active. For <button>
elements, this is done via :active
. For <a>
elements, it’s done with .active
. However, you may use .active
on <button>
s (and include the aria-pressed="true"
attribute) should you need to replicate the active state.
Disabled state
Make buttons look unclickable by reducing opacity and disabling pointer events. by adding a .disabled
class to <a>
buttons.
Button sizing
Need a bigger button on the odd occasion? Add .btn--lg
, or . btn--sm
and get proportionally scaled buttons, that don’t nuke your vertical rhythym, automagically.
You can make any button span the full width of its parent element by adding .btn btn--natural
.
Grid
Create complex, responsive, grid layouts effortlessly. Define a grid container with the .grid
class and populate it with any number of .grid-item
elements. Simples.
Define the width of your grid items in your CSS, to keep stylistic markup out of your html, or attach responsive width utility classes to your .grid-item
elements. There is no need to define grid rows, or to clearfix anything, just grid-n’-go!
* The demo leans on the .alert class to provide styling. It’s not required so not included in the markup examples.
Example HTML
Padded grids
Create horizontal gutters between your grid items with the add-on class .grid--padded.
Example HTML
Nested grids
Want more than six-columns in your regular grid? No problem, grids are nestable. Just nest a new .grid
inside a .grid-item
, as in this example where a nine-column grid is constructed using the width class .one-third
.
Lists
Embrace’s default list styles can optionally be extended with these styling classes.
Styled Lists
Apply your projects default list style with the class .list--styled
. Tweak, or expand upon, this class to fit your project. Add your own styles or modify these at /src/scss/patterns/lists.scss.
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem at massa
- Facilisis in pretium nisl aliquet
Underlined Lists
An alternate list styling class is also provided with .list--underlined
, which does what you would expect…
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem at massa
- Facilisis in pretium nisl aliquet
Unstyled Lists
Remove default list styles with .list--unstyled
, and make your list not look like a list.
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem at massa
- Facilisis in pretium nisl aliquet
Inline Lists
Force list elements to display inline with .list--inline
. Don’t use this class for navigation lists though, use .nav
instead as it @extends .list--inline
and additionaly provides finger-sized tap-targets and stuff.
- Lorem
- Ipsum
- Dolor
- Sit
Navigation
The basic .nav pattern class throws elements inline, sets the project-defined $font-weight and $font-family values.
Optional section-specific classes target the element that represents the primary navigaton element, a specific section of your web page.
Breadcrumb
Indicate the current page location within the navigational hierarchy.
Headings
Apply the style of a semantic header element to any other element. Looks like a header visually, but carries none of the semantic value.
.h1
.h2
.h3
.h4
.h5
.h6
Example HTML
Images
Manipulate image positioning and appearance with these extensible classes.
Photo courtesy of freestocks.org and found via Unsplash.
Rounded images
Round the corners of an image with the project variable $radius-brand
.
Example HTML
Circular images
Make square images circular. That’s it.
Example HTML
Floated Images
Float images to the left or right, extending the .float-left
and .float-right
utility classes, but adding sensible margins to prevent collisions with content. You may wish to .clearfix
the parent element, feel free to do so.
Example HTML
Example HTML
Image sizing
Make images to cover the parent element to give a background image effect.
Example HTML
Retina-squish
Reduce an image size using width classes to ”retina-fy” your image by squishing it into a smaller container! Just wrap an image in any block-level element and resize it with Embrace’s width classes.