Sha256: c39c8a112b712f8f1e6ddbaa81f389693d20a18b632ab65310667a5857ffcdda

Contents?: true

Size: 501 Bytes

Versions: 354

Compression:

Stored size: 501 Bytes

Contents

// Convert shorthand to the 4-value syntax

@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

354 entries across 343 versions & 12 rubygems

Version Path
bourbon-3.2.1 dist/functions/_unpack.scss
bourbon-4.0.0 app/assets/stylesheets/functions/_unpack.scss
bourbon-4.0.0 dist/functions/_unpack.scss
bourbon-3.2.0 dist/functions/_unpack.scss
bourbon-3.2.0 app/assets/stylesheets/functions/_unpack.scss
bourbon-4.0.0.rc2 app/assets/stylesheets/functions/_unpack.scss
bourbon-4.0.0.rc2 dist/functions/_unpack.scss
bourbon-4.0.0.rc1 dist/functions/_unpack.scss
bourbon-4.0.0.rc1 app/assets/stylesheets/functions/_unpack.scss
bourbon-3.2.0.beta.2 dist/functions/_unpack.scss
bourbon-3.2.0.beta.2 app/assets/stylesheets/functions/_unpack.scss
bourbon-compass-3.2.0.beta.1.a stylesheets/bourbon/functions/_unpack.scss
bourbon-3.2.0.beta.1 dist/functions/_unpack.scss
bourbon-3.2.0.beta.1 app/assets/stylesheets/functions/_unpack.scss