Created
November 13, 2014 09:33
-
-
Save roryashfordbentley/629423a78be99a2c5bca to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
| // ---- | |
| // Sass (v3.4.7) | |
| // Compass (v1.0.1) | |
| // ---- | |
| // Sass variables scope example | |
| $test: true; | |
| $name: ".beefy"; | |
| @mixin scopetest(){ | |
| //$name: null // this would reinstantiate the variable within the scope of the mixin so the below values are used. | |
| @if($test == true){ | |
| $name: ".foo"; | |
| } @else { | |
| $name: ".bar"; | |
| } | |
| .test{ | |
| rule: $name; | |
| } | |
| } | |
| @include scopetest(); |
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
| .test { | |
| rule: ".beefy"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment