Shorthand Syntax Parser
The syntax parser converts shorthand syntax into a map of settings that can be compared/merged with other config maps and global setting.
parse function provides all the syntax-sugar in Susy, converting user shorthand into a usable map of keys and values that can be normalized and passed to Su.
Parameters & Return
Shorthand expression to define the width of the span, optionally containing:
- a count, length, or column-list span;
lastlocation on asymmetrical grids;
widerfor optionally spreading across adjacent gutters;
of $n <spread>for available grid columns and spread of the container (span counts like
of 6are only valid in the context of symmetrical grids);
set-gutters $nto override global gutter settings
$context-only: false (bool)
Allow the parser to ignore span and span-spread values, only parsing context and container-spread. This makes it possible to accept spanless values, like the
gutters() syntax. When parsing context-only, the
of indicator is optional.
Map of span and grid settings parsed from shorthand input – including all the properties available globally –
container-spread – along with the span-specific properties
when a shorthand value is not recognized