Susy 3.0.8

Validation

Each argument to Su has a single canonical syntax. These validation functions check to ensure that each argument is valid, in order to provide useful errors before attempting to calculate the results/

Related

@function su-valid-columns()

@function su-valid-gutters()

@function su-valid-spread()

@function su-valid-span()

Check that the span argument is a number, length, or column-list

Parameters & Return

$span: (number | list)

Number of columns, or length of span

@return (number | list)

Validated $span number, length, or columns list

@error

when span value is not a number, or valid column list

Requires

@function su-valid-columns()

@function _susy-error() [private]

Used By

@function su-span()

@function _su-sum() [private]

@function _su-calc-span() [private]

@function _su-calc-sum() [private]

@function _su-needs-calc-output() [private]

@function su-valid-columns()

Check that the columns argument is a valid list of column-lengths

Parameters & Return

$columns: (list)

List of column-lengths

$silent-failure: true (bool)

Set false to return null on failure

@return (list)

Validated $columns list

@error

when column value is not a valid list of numbers

Requires

@function _susy-error() [private]

Used By

@function susy-parse()

@function su-valid-span()

@function su-span()

@function su-slice()

@function _su-calc-span() [private]

@function _su-needs-calc-output() [private]

@function _susy-svg-offset() [private]

@function su-valid-gutters()

Check that the gutters argument is a valid number

Parameters & Return

$gutters: (number)

Width of a gutter

@return (number)

Validated $gutters number

@error

when gutter value is not a number

Requires

@function _susy-error() [private]

Used By

@function su-span()

@function _su-sum() [private]

@function _su-calc-span() [private]

@function _su-calc-sum() [private]

@function _su-needs-calc-output() [private]

@function _susy-svg-offset() [private]

@function su-valid-spread()

Check that the spread argument is a valid intiger between -1 and 1

Parameters & Return

$spread: (0 | 1 | -1)

Number of gutters to include in a span, relative to the number columns

@return (0 | 1 | -1)

Validated $spread number

@error

when spread value is not a valid spread

Requires

@function _susy-error() [private]

Used By

@function su-span()

@function _su-sum() [private]

@function _su-calc-span() [private]

@function _su-calc-sum() [private]

@function _susy-svg-offset() [private]

@function su-valid-location()

Check that the location argument is a valid number, within the scope of available columns

Parameters & Return

$span: (number)

Number of grid-columns to be spanned

$location: (integer | string)

Starting (1-indexed) column-position of that span

$columns: (list)

List of available columns in the grid

@return (integer)

Validated $location intiger

@error

when location value is not a valid index, given the context and span.

Requires

@function _susy-error() [private]

Used By

@function su-span()

@function su-slice()