Created
December 20, 2011 04:43
-
-
Save twe4ked/1500292 to your computer and use it in GitHub Desktop.
FREE! Sass (SCSS) mixin for easily setting the width and height (size) and an element.
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
@mixin size($width, $height: $width) { | |
width: $width; | |
height: $height; | |
} | |
// Examples | |
#foo { | |
@include size(10px); | |
} | |
#bar { | |
@include size(10px, 20px); | |
} |
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
#foo { | |
width: 10px; | |
height: 10px; } | |
#bar { | |
width: 10px; | |
height: 20px; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment