mixins

segment

View source
@mixin segment() { ... }

Use to separate components on the page.

Modifiers

  • --grey modifier to change the background color

This mixin takes no parameters.

Example

.segment {
  @include segment();
}

container

View source
@mixin container() { ... }

Create a container element to wrap segments

Modifiers

  • --slim removes the gutters
  • --narrow smaller width
  • --half half of the max width

This mixin takes no parameters.

icon-before

View source
@mixin icon-before($uri) { ... }

Use in an icon to add it to the before selector

Parameters

$uri
    string Required

The icon uri to add

clearfix

View source
@mixin clearfix() { ... }

A simple clearfix helper

This mixin takes no parameters.

respond-to

View source
@mixin respond-to($screen-width, $method: 'min') { ... }

Set up a media query passing a value to use for min width

Parameters

$screen-width
    number Required

A value for the media query

$method
    string Default:'min'

'min' or 'max'

Example

.header {
    @include respond-to($min-1290) {

    }
}

best-fit-padding

View source
@mixin best-fit-padding($imageWidth, $imageHeight) { ... }

Providing an image width and height, provides the correct aspect ratio via padding-bottom % This should be used with an element of a height of 0, so that the height is determined by the padding-bottom rather than the element's height property

Parameters

$imageWidth
    number Required

The width of the image

$imageHeight
    number Required

The height of the image

hardware-acceleration

View source
@mixin hardware-acceleration() { ... }

Hack to force GPU rendering (most in the community argue this should be used quite sparingly!!)

This mixin takes no parameters.

z-layer

View source
@mixin z-layer() { ... }

A mixin to help clean up z-index madness. Options are: below, default, middle, top, and modal [/doc]

This mixin takes no parameters.

divider

View source
@mixin divider() { ... }

Standard divider used between sections

This mixin takes no parameters.

author-image

View source
@mixin author-image($mobile, $orientation: 'vertical') { ... }

Style the author's image

Parameters

$mobile
    boolean Required

No description available.

$orientation
    string Default:'vertical'

'vertical' or 'horizontal'

author-creds

View source
@mixin author-creds($mobile) { ... }

Style the author's credentials

Parameters

$mobile
    boolean Required

No description available.

author-name

View source
@mixin author-name($mobile) { ... }

Style the author's name

Parameters

$mobile
    boolean Required

No description available.

author-title

View source
@mixin author-title($mobile) { ... }

Style an author's Title

Parameters

$mobile
    boolean Required

No description available.

placeholder

View source
@mixin placeholder() { ... }

Placeholder

Outputs vendor-prefixed placeholders for styling. Must be nested in a rule-set.

This mixin takes no parameters.

Example

Usage

input { @include placeholder { color: #999; } }

form-control

View source
@mixin form-control($type: "text") { ... }

Includes a form control

Parameters

$type
    String Default:"text"

The input type of the control; accepts "text" or "select"

Example

textarea,
input[type="text"] {
  @include form-control;
}

select {
  @include form-control("select");
}

fade-edge

View source
@mixin fade-edge($side, $offset: 0, $width: 3rem) { ... }

Apply to a :before or :after psuedo element to create a soft fade on an edge. Typically used to hide overflow and therefore best used with overflow: hidden; and white-space: nowrap;.

Parameters

$side
    String Required

left or right

$offset
    String Default:0

Amount of offset

$width
    String Default:3rem

Width of the fade

Example

.text {
  color: #333;
  font-size: 1em;
  overflow: hidden;
  white-space: nowrap;
  width: 400px;

  &:after {
    @include fade-edge("right");
  }
}

h1

View source
@mixin h1() { ... }

Mixin for main headers

This mixin takes no parameters.

functions

percent

View source
@function percent($target, $context) { ... }

Convert a pixel value to a percentage value

Parameters

$target
    String Required

Pixel value of element width

$context
    String Required

Pixel value of element's container width

Returns

Percentage value

String

em

View source
@function em($pixel, $base: 16px) { ... }

Convert a pixel value to an em value

For a relational value, the input is calculated based on a parent value. The default parent is 16px. The parent can be changed by passing an optional second value.

Parameters

$pixel
    String Required

Pixel value to convert

$base
    String Default:16px

Base pixel value

Returns

em value

String

strip-units

View source
@function strip-units($number) { ... }

Removes units from a number string

Parameters

$number
    string Required

The string to remove units from

variables