cross-browser-support

mixins

keyframes

@mixin keyframes($name) { ... }

Description

Mixin to handle cross browser keyframes for CSS animations.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

Animation name

Stringnone

prefixer

@mixin prefixer($property, $value, $vendors: 'webkit' 'moz' 'ms' 'o') { ... }

Description

Mixin to prefix properties that are not prefixed by Compass

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$property

Property to prefix

Stringnone
$value

Value for property

Anynone
$vendors

Vendor prefixes to output

List'webkit' 'moz' 'ms' 'o'

Example

 @include prefixer('transform', 'translate(10px)');

opacity

@mixin opacity($opacity) { ... }

Description

Mixin for cross-browser opacity (IE 8). Clamps the value between 0 and 1.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$opacity

Opacity level, between 0 and 1

Numbernone

Requires

Used by

helpers

mixins

clearfix

@mixin clearfix($extend: true) { ... }

Description

Float clearing helper.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$extend

Whether or not extend a placeholder.

Booltrue

Requires

Used by

visually-hidden

@mixin visually-hidden($extend: true) { ... }

Description

Accessibility hiding helper.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$extend

Whether or not extend a placeholder.

Booltrue

Requires

Used by

ellipsis

@mixin ellipsis($extend: true) { ... }

Description

Accessibility ellipsis helper.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$extend

Whether or not extend a placeholder.

Booltrue

Requires

Used by

General

functions

opposite-direction

@function opposite-direction($directions) { ... }

Description

Returns the opposite direction of every direction in $directions.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$directions

Positions to revert

Listnone

Returns

List or Null

Throws

  • No opposite direction found for $direction.

clamp

@function clamp($value, $min, $max) { ... }

Description

Clamp $value between $min and $max.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

Value to clamp between $min and $max

Numbernone
$min

Minimum value

Numbernone
$max

Maximum value

Numbernone

Returns

Number or Null

Throws

  • All parameters must be numbers for clamp.

Used by

z

@function z($layer) { ... }

Description

Helper to manage z-index. Tries to fetch the z-index mapped to $layer in $z-indexes map. If found, returns it, else returns null.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$layer

Layer

Stringnone

Returns

Number or Null

Example

z-index: z("default")

Throws

  • No z-index found for $layer.

Requires

is-valid-length

@function is-valid-length($value) { ... }

Description

Tests whether the value is a valid length.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

Value to test

Anynone

Returns

Bool

top-shadow

@function top-shadow($depth) { ... }

Description

Computes a top-shadow for a card effect.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$depth

depth level

Numbernone

Returns

List

Used by

bottom-shadow

@function bottom-shadow($depth) { ... }

Description

Computes a bottom-shadow for a card effect.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$depth

depth level

Numbernone

Returns

List

Used by

placeholders

clearfix

%clearfix { ... }

Description

Clearfix helper

Requires

visually-hidden

%visually-hidden { ... }

Description

Accessibility hiding helper.

Requires

ellipsis

%ellipsis { ... }

Description

Accessibility ellipsis helper.

Requires

mixins

size

@mixin size($width, $height: $width) { ... }

Description

Mixin to size elements.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$width

Width

Numbernone
$height

Height

Number$width

Used by

[private] position

@mixin position($position, $top: null, $right: null, $bottom: null, $left: null) { ... }

Description

Shorthand for positioning.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$position

Position type (either absolute, fixed or relative)

Stringnone
$top

Top offset

Lengthnull
$right

Right offset

Lengthnull
$bottom

Bottom offset

Lengthnull
$left

Left offset

Lengthnull

Requires

Used by

absolute

@mixin absolute($args...) { ... }

Description

Shorthand for absolute positioning.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$args

Offsets

Arglistnone

Example

Stretch an item over its parent.

 @include absolute($top: 0, $right: 0, $bottom: 0, $left: 0)

Requires

relative

@mixin relative($args...) { ... }

Description

Shorthand for relative positioning.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$args

Offsets

Arglistnone

Requires

fixed

@mixin fixed($args...) { ... }

Description

Shorthand for fixed positioning.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$args

Offsets

Arglistnone

Requires

respond-to

@mixin respond-to($breakpoint) { ... }

Description

Responsive manager.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$breakpoint

Breakpoint

Stringnone

Throws

  • No value found for #{$breakpoint}.

Requires

inline-block

@mixin inline-block($align: null) { ... }

Description

Mixin handling inline-block and vertical-align at once. If no align is specified, then the vertical-align property won't be output.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$align

Vertical align

Stringnull

card

@mixin card($depth) { ... }

Description

Gives a card depth effect.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$depth

depth level [between 1 and 5]

Numbernone

Requires

Links

on-event

@mixin on-event($self: false) { ... }

Description

Event wrapper.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$self

Whether or not to include current selector

Boolfalse

Links

Author

  • Harry Roberts

when-inside

@mixin when-inside($context) { ... }

Description

Contexts

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$contextnoneString or Listnone

Author

  • Hugo Giraudel

variables

pink

$pink: #dd5a6f;

Description

Pink

Type

Color

purple

$purple: #5c4863;

Description

Purple

Type

Color

yellow

$yellow: #ffc93c;

Description

Yellow

Type

Color

black

$black: #333;

Description

Black

Type

Color

primary-color

$primary-color: $pink;

Description

Primary color

Type

Color

secondary-color

$secondary-color: $yellow;

Description

Primary color

Type

Color

tertiary-color

$tertiary-color: $purple;

Description

Primary color

Type

Color

light-grey

$light-grey: #e0e0e0;

Description

Light grey

Type

Color

Used by

medium-grey

$medium-grey: #ddd;

Description

Medium

Type

Color

breakpoints

$breakpoints: (
  'small':  (max-width: 800px),
  'medium': (min-width: 801px)
) !global;

Description

Map of breakpoints for responsive design.

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
small

small screens

Map(max-width: 800px)
medium

regular screens

Map(min-width: 801px)

Used by

See

z-indexes

$z-indexes: (
  'goku':       9001,
  'modal':      5000,
  'dropdown':   4000,
  'social':     3000,
  'default':       1,
  'below':        -1
) !global;

Description

Z-indexes layers.

Type

Map

Map structure

Map keyNameMap keyDescriptionMap keyTypeMap keyValue
key

aliases for specific z-indexes

Numbernone

Used by

  • [function] z

See

  • [function] z

sidebar-width

$sidebar-width: 280px;

Description

Sidebar width

Type

Number

vertical-rhythm

$vertical-rhythm: 1.5rem;

Description

Vertical rhythm

Type

Number

text-font-stack

$text-font-stack: 'Open Sans', 'Helvetica Neue Light', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;

Description

Text font stack

Type

List

code-font-stack

$code-font-stack: 'Courier New', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Monaco', monospace;

Description

Code font stack

Type

List