Skip to content

Instantly share code, notes, and snippets.

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 felippenardi/74cc3fbf9bb6d3548588 to your computer and use it in GitHub Desktop.
Save felippenardi/74cc3fbf9bb6d3548588 to your computer and use it in GitHub Desktop.
@mixin same($values...){
$length: length($values);
$value: nth($values, $length);
@for $i from 1 to $length{
#{nth($values, $i)}: $value;
}
}
//Usage:
footer{
@include same(top, left, right, bottom, 0);
@include same(height, line-height, 60px);
}
//Output
footer{
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 60px;
line-height: 60px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment