Sha256: a6eb20c2abb34f5a275b41acf1cdb13dcc4554981adbf90e01c91415635b21a2
Contents?: true
Size: 789 Bytes
Versions: 28
Compression:
Stored size: 789 Bytes
Contents
@charset "UTF-8"; /// Transforms shorthand that can range from 1-to-4 values to be 4 values. /// /// @argument {list} $shorthand /// /// @example scss /// .element { /// margin: _unpack-shorthand(1em 2em); /// } /// /// // CSS Output /// .element { /// margin: 1em 2em 1em 2em; /// } /// /// @access private @function _unpack-shorthand($shorthand) { @if length($shorthand) == 1 { @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1); } @else if length($shorthand) == 2 { @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2); } @else if length($shorthand) == 3 { @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2); } @else { @return $shorthand; } }
Version data entries
28 entries across 28 versions & 5 rubygems