Skip to content

Instantly share code, notes, and snippets.

@ryanallen
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanallen/10d04ec21da0d44d5577 to your computer and use it in GitHub Desktop.
Save ryanallen/10d04ec21da0d44d5577 to your computer and use it in GitHub Desktop.
Variable arguments in a Sass mixin or function
@mixin corners($corner...) {
border-radius: $corner;
}
.round-corners {@include corners(1rem 1em 1vw 1vmin);}
/// compiles to:
///
/// .round-corners {border-radius: 1rem 1em 1vw 1vmin;}
/// official docs: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#variable_arguments
/// example: http://codepen.io/ryanallen/pen/azWWOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment