Permalink
Browse files

Amending size mixin to check and allow unitless values

  • Loading branch information...
1 parent dcbdff9 commit caec89b2f8acc3845c6d20dcabcf6175e151f26e Tom Hare committed Oct 29, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 app/assets/stylesheets/addons/_size.scss
@@ -1,4 +1,15 @@
@mixin size($width, $height) {
- width: $width;
- height: $height;
+
+ @if $width == auto {
+ width: $width;
+ }
+ @else if not(unitless($width)) {
+ width: $width;
+ }
+ @if $height == auto {
+ height: $height;
+ }
+ @else if not(unitless($height)) {
+ height: $height;
+ }
}

0 comments on commit caec89b

Please sign in to comment.