Last active
August 29, 2015 14:13
-
-
Save ryanallen/10d04ec21da0d44d5577 to your computer and use it in GitHub Desktop.
Variable arguments in a Sass mixin or function
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
@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