animation

variables

ease-in-quad

$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);

Description

CSS cubic-bezier timing functions ported from Bourbon via jquery.easie (github.com/jaukia/easie)

Type

Cubic-bezier

Links

mixins

animated

@mixin animated($animation-name: null, $animation-duration: .65s, $animation-easing: $ease-out-quad) { ... }

Description

Sets the main animation properties. Optionally, we have a very basic set of custom animtions that can be passed. Note you must call initialize-animation mixin on root of your document to enable the keyframes;

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$animation-name

Currently available animation names: 'fade-in', 'fade-in-up', 'fade-in-down', 'over-scale'

Variablenull
$animation-duration

How long animation takes

Variable.65s
$animation-easing

Animation easing type

Variable$ease-out-quad

Links

initialize-animation

@mixin initialize-animation() { ... }

Description

Render the keyframes needed for animation mixin. Required to pass animation-names to animated mixin.

Parameters

None.

Example

@include initialize-animation();

Links

code

mixins

code

@mixin code($color: #DF5C33) { ... }

Description

Styles inline code snippets on your page. Defaults to a beautiful red, but can be passed any color.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$color

Text Color

Variable#DF5C33

Example

code {
  @include code(blue);
}

Requires

pre

@mixin pre() { ... }

Description

Some default styles for code blocks on your page. Takes not arguments

Parameters

None.

Example

pre {
  @include pre();
}

Requires

forms

mixins

select-box

@mixin select-box($bg-color: #FFF, $border-radius: .2em, $arrow-image: null, $arrow-size: 6px, $focus-glow: #B4DEFA, $text-color: null, $bg-hover-color: null, $border-color: null, $border-hover-color: null) { ... }

Description

Styling select boxes is the worst. Hopefully this makes life a little easier. Automagically colors elements based on luminance of the backbground color. Pass it a custom arrow image, or use a handy css-only triangle by default. Must be called on an element that wraps the select. Works with Safari, Chrome, Firefox, and IE10+.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$bg-color

default background-color

Variable#FFF
$border-radius

border radius

Variable.2em
$arrow-image

Custom image for the dropdown

Variablenull
$arrow-size

Size of arrow image (change if image provided)

Variable6px
$focus-glow

Sets a glow around the dropdown when focused. Remove with 'null'

Variable#B4DEFA
$text-color

Determined dynamically based on luminance of background color, but can be overwritten.

Variablenull
$bg-hover-color

Determined dynamically based on luminance of background color, but can be overwritten.

Variablenull
$border-color

Determined dynamically based on luminance of background color, but can be overwritten.

Variablenull
$border-hover-color

Determined dynamically based on luminance of background color, but can be overwritten.

Variablenull

Example

.select-wrapper {
  @include select-box();
}

.select-wrapper {
 @include select-box(#efefef, 0px, $arrow-size: 15px, $arrow-image: "http://dbox.us/_img/sample-arrow.png")
}

Requires

Links

radio

@mixin radio($color: #0074D9, $size: 1em) { ... }

Description

A simple reset for radio button styling across browsers. Note must be used on the

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$color

active radio button color

Variable#0074D9
$size

size of the radio button

Variable1em

Example

label {
  @include radio();
}

Links

layout

mixins

clearfix (aliased as cf )

@mixin clearfix() { ... }

Description

Just your standard clearfix.

Parameters

None.

Example

@include clearfix();

Used by

cf (alias for clearfix)

@mixin cf() { ... }

Refer to clearfix.

ratio-box

@mixin ratio-box($ratio: 1 / 1, $bg-color: $base-gray, .2) { ... }

Description

This sets a specific width/height ratio. Useful on background images, iframes and Youtube embeds.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$ratio

Aspect ratio: height / width

Variable1 / 1
$bg-color

placeholder background color

Variable$base-gray, .2

Example

figure {
  @include ratio(16 / 9);
}

Links

cover

@mixin cover($x: center, $y: center) { ... }

Description

Useful shortcut for setting background size to cover

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$x

x position

Variablecenter
$y

y position

Variablecenter

Example

div.hero {
  @include cover(top, center);
}

full-page

@mixin full-page($height: 100vh, $max-height: 850px, $min-height: 600px, $breakpoint: 768px) { ... }

Description

Create a responsive full page section with intelligent defaults. Resets on mobile.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$height

Page height

Variable100vh
$max-height

Max page height

Variable850px
$min-height

Min page height

Variable600px
$breakpoint

Disable below this size or pass 'null' to not use a breakpoint.

Variable768px

Example

section {
  @include full-page();
}

section {
  @include full-page(calc(100vh - 90px), 800px, 500px);
}

Links

vertically-align

@mixin vertically-align($reset: Null) { ... }

Description

Cross browser vertical align. Works down to IE9.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$reset

Pass false to reset override to original values

VariableNull

Example

article {
  @include vertically-align();
}

h4 {
  @include vertically-align(false);
}

Links

rule

@mixin rule($color: rgba(#000, .15), $spacing: 1.5em) { ... }

Description

Clean reset for divider lines.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$color

Line color

Variablergba(#000, .15)
$spacing

Margin above and below the line

Variable1.5em

Example

hr {
  @include rule();
}
hr.blue {
  @include rule(blue);
}

TODO's

    • $border-width param

table-layout

@mixin table-layout($layout-type: fixed) { ... }

Description

Sets element and its children to use table layout. An old but very powerful css property for flexible layout challenges.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$layout-type

fixed or auto

Variablefixed

Example

ul {
  @include table-layout();
}

Links

absolute-center

@mixin absolute-center($width: 50%) { ... }

Description

Faster centering when your element has to be position: absolute;

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$width

Width of your item

Variable50%

Example

div {
  @include absolute-center(400px);
}

Links

material-shadow

@mixin material-shadow($z-depth: 1, $strength: 1, $color: 1) { ... }

Description

Box shadows based on 5 Material Design presets;

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$z-depth

shadow distance on z-axis

Variable1
$strength

multiplier for shadow strength/darkness

Variable1
$color

shadow color

Variable1

Example

div {
  @include material-shadow(3);
}

Requires

Links

reset

mixins

normalize

@mixin normalize() { ... }

Description

Normalize css. Keeps some defaults. Call this on the root of your project.

Parameters

None.

Example

@include normalize();

sanitize

@mixin sanitize() { ... }

Description

Sanitize css. Another reset. Call this on the root of your project.

Parameters

None.

Example

@include sanitize();

Links

rest

mixins

reset-css

@mixin reset-css() { ... }

Description

Meyer reset. Use this when you want to nuke all styles. Otherwise maybe use normalize mixin.

Parameters

None.

Example

@include reset-css();

settings

variables

base-font-size

$base-font-size: 16px !default;

Description

Sets the base font size for rem calculations;

Type

Number (px)

Used by

base-gray

$base-gray: #707F8C !default;

Description

Base gray - tweak this to add slight color tint to the grayscale, then base all grays off this color. If you want flat gray use #888888

Type

Color (hex)

Used by

table

mixins

table

@mixin table($border: true, $striped: true, $condensed: false) { ... }

Description

Ported directly from Twitter Bootstrap (by way of Axis), as they did an excellent job with the tables.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$border

Makes table bordered

Variabletrue
$striped

Adds zebra striping

Variabletrue
$condensed

Makes the table condensed

Variablefalse

Example

table {
  @include table();
}

Requires

TODO's

    • make hover effect optional

typography

mixins

inline-list

@mixin inline-list($spacing: 20px) { ... }

Description

For when you need your list to be horizontal.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$spacing

Amount of spacing between elements - can be whatever unit you like.

Variable20px

Example

ul {
  @include inline-list();
}

Requires

text-list

@mixin text-list($style: disc) { ... }

Description

We tend to spend a great deal of time resetting all of the properties for lists. This puts them back to roughly the same state as browser defaults. You can pass it any option that [list-style-type] (http://www.w3schools.com/cssref/pr_list-style-type.asp) would normally take.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$style

Amount of spacing between elements. can be whatever unit you like.

Variabledisc

Example

ul {
  @include text-list();
}
ul {
  @include text-list('disc');
}

reset-list

@mixin reset-list() { ... }

Description

Resets the margins padding, and styles to list.

Parameters

None.

Example

ul {
  @include reset-list();
}

ellipsis

@mixin ellipsis($width: 100%) { ... }

Description

Truncate text to the width of its container...

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$width

Width of the container can be whatever unit you like.

Variable100%

Example

h3 {
  @include ellipsis();
}

fluid-type

@mixin fluid-type($min-font-size: 12px, $max-font-size: 24px, $lower-range: 420px, $upper-range: 900px) { ... }

Description

Magic calc + vh combo to allow text to be fluid between minimum and maximum breakpoints.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$min-font-size

Minimum font size

Variable12px
$max-font-size

Maximum font size

Variable24px
$lower-range

Stop scaling font smaller at this screen resolution

Variable420px
$upper-range

Stop scaling font larger at this screen resolution

Variable900px

Example

h1 {
  @include fluid-type(20px, 48px);
}

Links

ui

mixins

button

@mixin button($background-color: #00BFFF, $color: #FFF) { ... }

Description

A starting place for button styling.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$background-color

Button background color

Variable#00BFFF
$color

Button text color

Variable#FFF

Example

a.btn {
  @include button();
}
a.yellow-button {
  @include button(yellow, black);
}

utilities

functions

pow

@function pow($x, $n) { ... }

Description

Power function

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$xnoneNumbernone
$nnoneNumbernone

Returns

Number

Used by

Links

rem

@function rem($size) { ... }

Description

Calculates and returns the rem value based on px input. Default base font size is 16px, but can be changed with a global $base-font-size variable.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$size

Size in pixels

Variablenone

Example

font-size: rem(30px);
// returns font-size: 1.875rem;

Requires

Used by

strip-unit

@function strip-unit($number) { ... }

Description

Sometimes it's just easier to do calculations with the unit is stripped.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$number

Number that has a unit

Numbernone

Example

$length: 42px;
$value: strip-unit($length);
// -> 42

Links

luminance

@function luminance($color) { ... }

Description

Returns the luminance of $color as a float (between 0 and 1) 1 is pure white, 0 is pure black

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$color

Color

Colornone

Returns

Number

Requires

Used by

Links

Author

  • Hugo Giradel

mixins

debug

@mixin debug() { ... }

Description

Debugging tool - adds a border to the current element, its children, grandchildren, etc so you can see what's up – great for precise layout tweaks. It will also add flags if you made mistakes like put in inline styles, forgot an alt on an image, left the alt blank, etc. Not to be used in production, obviously.

Parameters

None.

Example

.container-elment {
  @include debug();
}

Links

triangle

@mixin triangle($direction: up, $size: 10px, $color: #000) { ... }

Description

Makes a little css triangle for you.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$direction

Direction of the triangle: up, down left or right

Variableup
$size

Size of the triangle

Variable10px
$color

Color of the triangle

Variable#000

Example

.element:after {
  @include triangle();
}
span {
  @include triangle(right, 8px, red);
}