Created
October 31, 2014 00:32
-
-
Save farinspace/2bc77fdb2d5a7d656cf6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.6) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin size($size) { | |
$height: nth($size, 1); | |
$width: $height; | |
@if length($size) > 1 { | |
$height: nth($size, 2); | |
} | |
@if $height == auto or (type-of($height) == number and not unitless($height)) { | |
height: $height; | |
} | |
@if $width == auto or (type-of($width) == number and not unitless($width)) { | |
width: $width; | |
} | |
} | |
$height:10; | |
.sample { | |
@include size(10px $height + px) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sample { | |
width: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment