Skip to content

Instantly share code, notes, and snippets.

@twe4ked
Created December 20, 2011 04:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twe4ked/1500292 to your computer and use it in GitHub Desktop.
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.
@mixin size($width, $height: $width) {
width: $width;
height: $height;
}
// Examples
#foo {
@include size(10px);
}
#bar {
@include size(10px, 20px);
}
#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