Created
February 23, 2015 01:21
-
-
Save jasonkmccoy/0d2f3a71785cc94d9413 to your computer and use it in GitHub Desktop.
Sass mixin for setting an element's width and height
This file contains hidden or 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
/* SCSS Code */ | |
@mixin size($width, $height: $width) { | |
width: $width; | |
height: $height; | |
} | |
// Example Usage | |
.element { | |
@include size(100%); | |
} | |
.other-element { | |
@include size(100%, 1px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credit: http://www.sitepoint.com/sass-mixins-kickstart-project/