Last active
August 29, 2015 14:00
-
-
Save daneden/11187132 to your computer and use it in GitHub Desktop.
Directives inside property expressions
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
.grid--debug-cols:before { | |
content: ''; | |
position: absolute; | |
margin: 0 auto; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
$cols: 5; | |
$output: (); | |
@for $i from 1 through $cols { | |
$output: append($output, #{"blue #{percentage($i/$cols)},"}); | |
$output: append($output, #{"transparent #{percentage($i/$cols)},"}); | |
$output: append($output, #{"transparent calc( #{percentage($i/$cols)} + 23px),"}); | |
$output: append($output, #{"blue calc(#{percentage($i/$cols)} + 23px),"}); | |
} | |
background-image: linear-gradient(left, | |
transparent, | |
transparent 23px, | |
blue 23px, | |
unquote($output) | |
blue 100%, | |
transparent 100% | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment