Last active
August 29, 2015 14:17
-
-
Save Snugug/37424f7b9a02ce5d97f4 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
| <div class="foo" data-eq-state="small medium large"> | |
| hello world | |
| </div> | |
| <div class="bar" data-eq-state="small medium large"> | |
| hello world | |
| </div> | |
| <div class="foo" data-eq-state="small"> | |
| hello world | |
| </div> |
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
| // ---- | |
| // libsass (v3.1.0) | |
| // ---- | |
| @mixin eq($state) { | |
| &[data-eq-state$=#{$state}] { | |
| @content; | |
| } | |
| } | |
| @mixin eq-contains($state) { | |
| &[data-eq-state~=#{$state}] { | |
| @content; | |
| } | |
| } | |
| .foo { | |
| @include eq('large') { | |
| background: blue; | |
| } | |
| } | |
| .foo { | |
| @include eq('small') { | |
| background: red; | |
| } | |
| } | |
| .bar { | |
| @include eq-contains('medium') { | |
| background: green; | |
| } | |
| } | |
| // .bar { | |
| // @include eq-contains('small') { | |
| // background: yellow; | |
| // } | |
| // } |
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
| .foo[data-eq-state$=large] { | |
| background: blue; } | |
| .foo[data-eq-state$=small] { | |
| background: red; } | |
| .bar[data-eq-state~=medium] { | |
| background: green; } |
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
| <div class="foo" data-eq-state="small medium large"> | |
| hello world | |
| </div> | |
| <div class="bar" data-eq-state="small medium large"> | |
| hello world | |
| </div> | |
| <div class="foo" data-eq-state="small"> | |
| hello world | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment