General

mixins

restyle

@mixin restyle($descriptors...) { ... }

Description

outputs the styles for the given descriptors

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$descriptors...

the descriptors

Map or List or Stringnone

Content

This mixin allows extra content to be passed (through the @content directive).

Output

the styles

restyle-diff

@mixin restyle-diff($original, $other) { ... }

Description

outputs the style difference between the two definitions

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$original

the original restyle object

Map or List or Stringnone
$other

the other restyle object to compare

Map or List or Stringnone

Content

This mixin allows extra content to be passed (through the @content directive).

restyle-define

@mixin restyle-define($name, $definition) { ... }

Description

adds a new restyle definition

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

the name of the item to define

Stringnone
$definition

the definition

Mapnone

Content

This mixin allows extra content to be passed (through the @content directive).

restyle-alias

@mixin restyle-alias($alias, $maps-to) { ... }

Description

convenience mixin for aliasing definitions

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$alias

the alias string

Stringnone
$maps-to

the definition to alias to

String or Listnone

restyle-extend

@mixin restyle-extend($name, $definition) { ... }

Description

convenience mixin for extending a restyle definition

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

the name of the item to extend

Stringnone
$definition

the definition

Mapnone

restyle-add-state

@mixin restyle-add-state($state, $selector) { ... }

Description

adds a new state mapping

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$state

the state enum

Stringnone
$selector

the mapping for the enum

Stringnone

restyle-config

@mixin restyle-config($key, $value) { ... }

Description

convenience mixin for invoking restyle-config function without having to use the function result

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$key

@see http://restylecss.com/documentation/configuration

Map or Stringnone
$value

@see http://restylecss.com/documentation/configuration

Anynone

restyle-with-config

@mixin restyle-with-config($key, $value) { ... }

Description

temporarily use a different config within a block

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$key

@see http://restylecss.com/documentation/configuration

Map or Stringnone
$value

@see http://restylecss.com/documentation/configuration

Anynone

Content

This mixin allows extra content to be passed (through the @content directive).

with-multiple-values

@mixin with-multiple-values($value) { ... }

Description

allows iterating over a collection of multiple-values for each iteration, the result is available as $restyle-current-value

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

the collection to iterate over

Anynone

Content

This mixin allows extra content to be passed (through the @content directive).

[private] -restyle--smart-content

@mixin -restyle--smart-content($placeholder, $output, $extend) { ... }

Description

outputs @content into a placeholder, and then extends it, if the placeholder already exists, just extend it

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$placeholder

the placeholder name to use

Stringnone
$output

if false, will only create the placeholder, but not extend it

Booleannone
$extend

if false, will force the content to be output in the current context, and not extended

Booleannone

Content

This mixin allows extra content to be passed (through the @content directive).

Requires

Used by

[private] -restyle--styles

@mixin -restyle--styles($styles, $extend) { ... }

Description

given a map of styles, outputs the styles into CSS

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$styles

the styles to process

Mapnone
$extend

whether or not to extend (depends on config smart-content-enabled being true)

Booleannone

Content

This mixin allows extra content to be passed (through the @content directive).

Throws

  • [restyle] #{$value}

Requires

[private] -restyle--log-time

@mixin -restyle--log-time($name, $`) { ... }

Description

a helper mixin for measuring the time it takes to do stuff

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

the name of the timer

Stringnone
$`

placeholder)

String} $message - the message to log (must contain a `{timenone

Content

This mixin allows extra content to be passed (through the @content directive).

Used by

functions

restyle

@function restyle($descriptors...) { ... }

Description

returns the styles for the given descriptors

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$descriptors...

the descriptors

Map or List or Stringnone

Returns

Map

the style map

restyle-diff

@function restyle-diff($original, $other) { ... }

Description

returns a diff of two restyle objects

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$original

the original restyle object

Map or List or Stringnone
$other

the other restyle object to compare

Map or List or Stringnone

Returns

Map

the style map

restyle-define

@function restyle-define($name, $definition) { ... }

Description

adds a new restyle definition

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

the name of the item to define

Stringnone
$definition

the definition

Mapnone

restyle-alias

@function restyle-alias($alias, $maps-to) { ... }

Description

function for aliasing definitions

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$alias

the alias string

Stringnone
$maps-to

the definition to alias to

String or Listnone

restyle-extend

@function restyle-extend($name, $definition) { ... }

Description

function for extending a restyle definition

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$name

the name of the item to extend

Stringnone
$definition

the definition

Mapnone

restyle-add-state

@function restyle-add-state($state, $selector) { ... }

Description

adds a new state mapping

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$state

the state enum

Stringnone
$selector

the mapping for the enum

Stringnone

multiple-values

@function multiple-values($values...) { ... }

Description

converts individual arguments into a meta object that can be easily iterated over

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$values...

the values to store

Anynone

Returns

Map

a Map with a single key @restyle.multivalue with the values stored as an list

restyle-config

@function restyle-config($key, $value) { ... }

Description

helper for getting/setting config values

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$key

@see http://restylecss.com/documentation/configuration

Map or Stringnone
$value

@see http://restylecss.com/documentation/configuration

Anynone

Returns

Any type —

the entire config Map or the individual config value

get-multiple-values

@function get-multiple-values($value) { ... }

Description

returns a list of values from a multiple-values() decorated object

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

the collection to fetch values from

Anynone

Returns

List

the values as a list

[private] -restyle--grammar

@function -restyle--grammar($descriptor) { ... }

Description

returns a grammar map given a descriptor

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$descriptor

the descriptor to convert

Map or List or Stringnone

Returns

Map

the grammar map

Requires

Used by

[private] -restyle--grammars

@function -restyle--grammars($descriptors...) { ... }

Description

returns a collection of grammar maps for a given collection of descriptors

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$descriptors...

the descriptors to convert

Map or List or Stringnone

Returns

List

the collection of grammar maps

Requires

[private] -restyle--styles-from-grammar

@function -restyle--styles-from-grammar($grammars...) { ... }

Description

given a grammar, retrieves style definition

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$grammars...

the grammars to process

Map or List or Stringnone

Returns

Map

the styles as a map

Requires

[private] -restyle--should-skip-mixin

@function -restyle--should-skip-mixin($value) { ... }

Description

helper function to determine if the value includes a nomixin attribute

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

the value to check

Anynone

Returns

Boolean

whether or not the value includes nomixin attribute

Used by

[private] -restyle--list-remove

@function -restyle--list-remove($list, $reject) { ... }

Description

removes an item from a list

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$list

the list to check

Listnone
$reject

the value to reject from the list

Anynone

Returns

List

the list without the rejected items

Used by

[private] -restyle--has-custom-styler

@function -restyle--has-custom-styler($property, $value, $method) { ... }

Description

checks whether or not a custom styler exists for a given property/value/method combination

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$property

the property

Stringnone
$value

the value

Stringnone
$method

the method

Stringnone

Returns

Boolean

Used by

[private] -restyle--get-state-selector

@function -restyle--get-state-selector($state) { ... }

Description

given a state name, will look up it's selector in the state-mappings config

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$state

the state to search for

Stringnone

Returns

String

the computed selector

Used by

[private] -restyle--placeholder-name

@function -restyle--placeholder-name($data) { ... }

Description

given a set of data will generate a hashed placeholder name

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$data

the data to process

Anynone

Returns

String

the hashed placeholder name

Used by

[private] -restyle--map-merge-deep

@function -restyle--map-merge-deep($destination, $source) { ... }

Description

deep merge a Sass Map

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$destination

the Map to merge into

Mapnone
$source

the Map to merge from

Mapnone

Returns

Map

the merged map

[private] -restyle--is-logging-enabled

@function -restyle--is-logging-enabled($type) { ... }

Description

whether or not logging is enabled

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$type

the type of logging to check

Stringnone

Returns

Boolean

whether or not logging is enabled

Used by

[private] -restyle--cast-to-args

@function -restyle--cast-to-args($args) { ... }

Description

casts an incoming values to a list of arguments

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$args

the value(s) to cast to args

Anynone

Returns

List

the list of arguments

Used by

[private] -restyle--log

@function -restyle--log($message, $type, $data, $severity, $silent) { ... }

Description

helper for logging messages

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$message

the message to log

Stringnone
$type

the type of log message

Stringnone
$data

the data to substitute into the $message

Mapnone
$severity

the serverity of the message being logged

Stringnone
$silent

if true, will not output the message

Booleannone

Returns

String

the message

Requires

Used by

[private] -restyle--is-multivalue

@function -restyle--is-multivalue($value) { ... }

Description

whether or not the value is a multivalue

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$value

the value to check

Anynone

Returns

Boolean

whether or not the value is a multivalue

Used by