Last active
August 29, 2015 14:10
-
-
Save magicspon/546e00098cdc15a41db2 to your computer and use it in GitHub Desktop.
Pointless SCSS Number 1
This file contains 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
// totally pointless mixin.. | |
// save yourself from typing two characters | |
// when applying the same values to different properties | |
// think of all the things you can do with the time saved | |
// @include s((border-left,border-right), 1px solid red); == 54 chars | |
// border-left: 1px solid red; border-right: 1px solid red; == 56 chars | |
// that's right... totally pointless mixin | |
@mixin s($props: (s, i, a, l), $val: false){ | |
@for $i from 1 through length($props) { | |
$prop: nth($props, $i); | |
#{$prop}: $val; | |
} | |
} | |
.test { | |
@include s((border-left,border-right), 1px solid red); | |
} |
This file contains 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
.test { | |
border-left: 1px solid red; | |
border-right: 1px solid red; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment