Skip to content

Instantly share code, notes, and snippets.

@jasonkmccoy
Created February 23, 2015 01:21
Show Gist options
  • Save jasonkmccoy/0d2f3a71785cc94d9413 to your computer and use it in GitHub Desktop.
Save jasonkmccoy/0d2f3a71785cc94d9413 to your computer and use it in GitHub Desktop.
Sass mixin for setting an element's width and height
/* SCSS Code */
@mixin size($width, $height: $width) {
width: $width;
height: $height;
}
// Example Usage
.element {
@include size(100%);
}
.other-element {
@include size(100%, 1px);
}
@jasonkmccoy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment