Sha256: 6ad1c37e4757b81897addb9c11653aab30f9429d38e644d535538ffe3c3c32c8

Contents?: true

Size: 780 Bytes

Versions: 313

Compression:

Stored size: 780 Bytes

Contents

@mixin size($size) {
  @if length($size) == 1 {
    @if $size == auto {
      width:  $size;
      height: $size;
    }

    @else if unitless($size) {
      width:  $size + px;
      height: $size + px;
    }

    @else if not(unitless($size)) {
      width:  $size;
      height: $size;
    }
  }

  // Width x Height
  @if length($size) == 2 {
    $width:  nth($size, 1);
    $height: nth($size, 2);

    @if $width == auto {
      width: $width;
    }
    @else if not(unitless($width)) {
      width: $width;
    }
    @else if unitless($width) {
      width: $width + px;
    }

    @if $height == auto {
      height: $height;
    }
    @else if not(unitless($height)) {
      height: $height;
    }
    @else if unitless($height) {
      height: $height + px;
    }
  }
}

Version data entries

313 entries across 307 versions & 10 rubygems

Version Path
daiblogs-0.2.1 _sass/bourbon/addons/_size.scss
daiblogs-0.2.0 _sass/bourbon/addons/_size.scss
daiblogs-0.1.5 _sass/bourbon/addons/_size.scss
daiblogs-0.1.4 _sass/bourbon/addons/_size.scss
daiblogs-0.1.2 assets/_sass/bourbon/addons/_size.scss
daiblogs-0.1.1 assets/_sass/bourbon/addons/_size.scss
daiblogs-0.1.0 assets/_sass/bourbon/addons/_size.scss
bookends-2.0.0 fixtures/dummy-jekyll/_sass/mixins/_size.scss
moovui-0.1.4 app/assets/stylesheets/bourbon/addons/_size.scss
smock-0.1.268 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.267 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.266 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.265 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.264 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.263 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.262 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.261 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.260 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.259 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss
smock-0.1.258 app/assets/stylesheets/thirdparty/bourbon/addons/_size.scss