3 /// Transforms shorthand that can range from 1-to-4 values to be 4 values.
5 /// @argument {list} $shorthand
9 /// margin: _unpack-shorthand(1em 2em);
14 /// margin: 1em 2em 1em 2em;
19 @function _unpack-shorthand($shorthand) {
20 @if length($shorthand) == 1 {
21 @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
22 } @else if length($shorthand) == 2 {
23 @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
24 } @else if length($shorthand) == 3 {
25 @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);