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() { ... }

Description

Sets the main animation properties. Used in initialize-animation

Parameters

None.

Requires

Used by

fade-in

@mixin fade-in() { ... }

Description

Fades in element using opacity.

Parameters

None.

Used by

See

fade-in-up

@mixin fade-in-up() { ... }

Description

Fades in opacity and moves element up on the Y axis.

Parameters

None.

Used by

See

fade-in-down

@mixin fade-in-down() { ... }

Description

Fades in opacity and moves element up on the Y axis.

Parameters

None.

Used by

See

over-scale

@mixin over-scale() { ... }

Description

Creates an elastic scaling up bigger than 100% then resting to 100% size.

Parameters

None.

Used by

See

initialize-animation

@mixin initialize-animation($max-delay-classes: 20) { ... }

Description

Put this on your document root to get a few nice animations. Warning: Creates classes in your css and styles them - not to be used inside an element.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$max-delay-classes

Number of delay classes (.delay-01, .delay-02, .delay-03) that will be rendered.

Variable20

Example

@include initialize-animation();

Requires

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);
}

pre

@mixin pre() { ... }

Description

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

Parameters

None.

Example

pre {
  @include pre();
}

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) { ... }

Description

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

note: Any content inside ratio-box will need to be positioned absolutely as not to change the aspect-ratio.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$ratio

Aspect ratio: height / width

Variable1 / 1

Example

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

Links

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

settings

variables

animation-duration

$animation-duration: .65s !default;

Description

Sets default duration for animations.

Type

Number (time)

Used by

animation-easing

$animation-easing: ease-out !default;

Description

Sets default duration for animations.

Type

Easing function

Used by

base-font-size

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

Description

Sets the base font size for rem calculations;

Type

Number (px)

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();
}

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

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

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

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);
}