API

functions

map-get-z

@function map-get-z($map, $keys...) { ... }
View source

Description

A deep, nested or chained version of map-get

Parameters

parameter Name parameter Description parameter Type parameter Default value
$map

Map

Map none
$keys

Keys to fetch

Arglist none

Returns

Any type

Used by

Author

  • Lu Nelson

map-merge-z

@function map-merge-z($map, $args...) { ... }
View source

Description

A deep, nested or chained version of map-merge that offers map-set syntax as well

Parameters

parameter Name parameter Description parameter Type parameter Default value
$map

Map

Map none
$args

Nested keys

Arglist none

Returns

Map

Updated map

Requires

Author

  • Lu Nelson

map-inspect

@function map-inspect($map, $level) { ... }
View source

Description

Return a pretty-printed string representation of a map

Parameters

parameter Name parameter Description parameter Type parameter Default value
$map

Map to inspect

Map none
$level

(1) - Internal variable, do not edit

Number none

Returns

String

String representation of $map

Requires

Author

  • Lu Nelson

map-subsort

@function map-subsort($map, $keys...) { ... }
View source

Description

Sort a map containing sub-maps, based on value at key(s) in sub-map

Parameters

parameter Name parameter Description parameter Type parameter Default value
$map

Map to sort

Map none
$keys

Keys to sort

Arglist none

Returns

Map

Requires

Author

  • Lu Nelson

variables

map-sort-dir

$map-sort-dir: 'asc';
View source

Description

Global sort direction: either asc or desc

Used by

Author

  • Lu Nelson

Helpers

functions

[private] slice

@function slice($list, $start, $end, $separator) { ... }
View source

Description

Return a sub-list from a list, sliced from/to given indices

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List to slice

List none
$start

(1) - Start index

Number none
$end

(length($list)) - End index

Number none
$separator

(list-separator($list)) - List separator

String none

Returns

List

Sliced list

Used by

Author

  • Lu Nelson

[private] tuple-key

@function tuple-key($tuple) { ... }
View source

Description

Return the key (first value) from a two-item list

Parameters

parameter Name parameter Description parameter Type parameter Default value
$tuple

Tuple

List none

Returns

* or Null

Key from $tuple or null

Used by

Author

  • Lu Nelson

[private] tuple-value

@function tuple-value($tuple) { ... }
View source

Description

Return the value (second value) from a two-item list

Parameters

parameter Name parameter Description parameter Type parameter Default value
$tuple

Tuple

List none

Returns

* or Null

Value from $tuple or null

Used by

Author

  • Lu Nelson

[private] str-multiply

@function str-multiply($string, $n) { ... }
View source

Description

Return input $string printed $n times

Parameters

parameter Name parameter Description parameter Type parameter Default value
$string

String to repeat

String none
$n

Number of times

Number none

Returns

String

Used by

Author

  • Lu Nelson

Old List-Maps API

functions

list-map-check

@function list-map-check($list) { ... }
View source

Description

Return list-map from $list and ensure input list-map is list-of-lists

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list none List none

Returns

List-map

Used by

Author

  • Lu Nelson

list-map-keys

@function list-map-keys($list...) { ... }
View source

Description

Return comma-separated list of keys from list-map Conformant with Ruby Sass map-keys()

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

Arglist none

Returns

List

Requires

Used by

Author

  • Lu Nelson

list-map-values

@function list-map-values($list...) { ... }
View source

Description

Return comma-separated list of values from list-map Conformant with Ruby Sass map-values()

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

Arglist none

Returns

List

Requires

Author

  • Lu Nelson

list-map-has-key

@function list-map-has-key($list, $key) { ... }
View source

Description

Check whether key exists in list-map at root level Conformant with Ruby Sass map-has-key()

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

List-map none
$key

Key to check

Any none

Returns

Bool

Requires

Author

  • Lu Nelson

list-map-get

@function list-map-get($list, $key) { ... }
View source

Description

Return value corresponding to key in list-map Conformant with Ruby Sass map-get()

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

List-map none
$key

Key to fetch

Any none

Returns

Any type —

Value mapped to $key

Requires

Used by

Author

  • Lu Nelson

list-map-merge

@function list-map-merge($list1, $list2) { ... }
View source

Description

Return a merge of second list-map in to first list-map Conformant with Ruby Sass map-merge()

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list1

First list-map

List-map none
$list2

Second list-map

List-map none

Returns

List-map

Requires

Used by

Author

  • Lu Nelson

list-map-remove

@function list-map-remove($list, $keys...) { ... }
View source

Description

Return list-map with tuples removed, according to keys (if found)

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

List-map none
$keys

Keys to remove from $list

Arglist none

Returns

List-map

Requires

Author

  • Lu Nelson

list-map-get-z

@function list-map-get-z($list, $keys...) { ... }
View source

Description

A deep, nested or chained version of map-get()

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

List-map none
$keys

Keys to fetch

Arglist none

Returns

Any type

Requires

Used by

Author

  • Lu Nelson

list-map-merge-z

@function list-map-merge-z($list, $args...) { ... }
View source

Description

A deep, nested or chained version of map-merge; offers map-set syntax too

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

List-map none
$args none Arglist none

Returns

List-map

Requires

Author

  • Lu Nelson

list-map-prev-key

@function list-map-prev-key($list, $key) { ... }
View source

Description

Return previous key from list-map

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

List-map none
$key

Pivot key

Any none

Returns

Any type

Requires

Author

  • Lu Nelson

list-map-next-key

@function list-map-next-key($list, $key) { ... }
View source

Description

Return next key from list-map

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

List-map none
$key

Pivot key

Any none

Returns

Any type

Requires

Author

  • Lu Nelson

list-map-inspect

@function list-map-inspect($list...) { ... }
View source

Description

Return the string representation of a list-map

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map to inspect

Arglist none

Returns

String

Requires

Author

  • Lu Nelson

list-map-pretty

@function list-map-pretty($list, $level) { ... }
View source

Description

Return the string representation of a list-map with indents and line breaks

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map to inspect

List-map none
$level

(1) - Internal variable, do not edit

Number none

Requires

Author

  • Lu Nelson

list-map-sort

@function list-map-sort($list-map, $keys...) { ... }
View source

Description

Return sorted list-map, based on values at given key(s)

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list-map

List-map to sort

List-map none
$keys

Keys to use for sorting

Arglist none

Returns

List-map

Requires

Author

  • Lu Nelson

list-map-json

@function list-map-json($list...) { ... }
View source

Description

Return JSON string representation of a list-map

Parameters

parameter Name parameter Description parameter Type parameter Default value
$list

List-map

Arglist none

Returns

String

JSON string

Requires

Author

  • Lu Nelson

variables

list-map-sort-dir

$list-map-sort-dir: 'asc';
View source

Description

Global sort direction: either asc or desc

Used by

Author

  • Lu Nelson