Created
June 20, 2014 20:36
-
-
Save 4aficiona2/82343ba297fdde1b3e39 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<div class="positiveOrNegative">positiveOrNegative: </div> |
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
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
@function positiveOrNegative() { | |
// can be 0 or -1 | |
$randNumber : (1 - random(2)); | |
// return 1 if is 0, otherwise return -1 | |
@return if($randNumber == 0, 1, $randNumber); | |
} | |
.positiveOrNegative { | |
&:after { | |
content: "#{positiveOrNegative()}"; | |
} | |
} |
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
.positiveOrNegative:after { | |
content: "-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
<div class="positiveOrNegative">positiveOrNegative: </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment