Sha256: 761cba7467b49d7f409e7acbd1d27f4dd7f673fb6d2d71f795232c35d27ab315

Contents?: true

Size: 737 Bytes

Versions: 7

Compression:

Stored size: 737 Bytes

Contents

@charset "UTF-8";

/// Converts shorthand to the 4-value syntax.
///
/// @argument {list} $shorthand
///
/// @example scss
///   .element {
///     margin: _unpack(1em 2em);
///   }
///
/// @example css
///   .element {
///     margin: 1em 2em 1em 2em;
///   }
///
/// @access private

@function _unpack($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

7 entries across 7 versions & 2 rubygems

Version Path
garth-jekyll-theme-0.1.9 _sass/bourbon/bourbon/utilities/_unpack.scss
bourbon-5.0.0.beta.6 core/bourbon/utilities/_unpack.scss
bourbon-5.0.0.beta.5 core/bourbon/utilities/_unpack.scss
bourbon-5.0.0.beta.4 core/bourbon/utilities/_unpack.scss
bourbon-5.0.0.beta.3 core/bourbon/utilities/_unpack.scss
bourbon-5.0.0.beta.2 core/bourbon/utilities/_unpack.scss
bourbon-5.0.0.beta.1 core/bourbon/functions/_unpack.scss