Sha256: 3abc37a2cb84369c4dc718bfd4abb57674c90247fc1261619cb401d1fe9bce68

Contents?: true

Size: 502 Bytes

Versions: 4

Compression:

Stored size: 502 Bytes

Contents

// Set `width` and `height` in a single statement

@mixin size($value) {
  $width: nth($value, 1);
  $height: $width;

  @if length($value) > 1 {
    $height: nth($value, 2);
  }

  @if is-size($height) {
    height: $height;
  }

  @else {
    @warn "`#{$height}` is not a valid length for the `$height` parameter in the `size` mixin.";
  }

  @if is-size($width) {
    width: $width;
  }

  @else {
    @warn "`#{$width}` is not a valid length for the `$width` parameter in the `size` mixin.";
  }
}

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
frozen-0.0.1 dummy/assets/stylesheets/bourbon/addons/_size.scss
bourbon-4.1.1 app/assets/stylesheets/addons/_size.scss
bourbon-4.1.0 app/assets/stylesheets/addons/_size.scss
bourbon-4.1.0.pre app/assets/stylesheets/addons/_size.scss