Created
September 8, 2014 17:30
-
-
Save andrewdc/23a9a510ef637a8017bd 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 data-am-module=""> | |
data-am-module="" | |
</div> | |
<div data-am-module="blue"> | |
data-am-module="blue" | |
</div> | |
<div data-am-module="large"> | |
data-am-module="large" | |
</div> | |
<div data-am-module="large blue"> | |
data-am-module="large blue" | |
</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
// ---- | |
// Sass (v3.4.3) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin am($module, $trait: null) { | |
@if $trait != null { | |
[data-am-#{$module}~="#{$trait}"]{ | |
@content; | |
} | |
} | |
@else { | |
[data-am-#{$module}]{ | |
@content; | |
} | |
} | |
} | |
@include am(module) { | |
color: red; | |
} | |
@include am(module, blue) { | |
color: blue; | |
} | |
@include am(module, large) { | |
font-size: 2em; | |
} |
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
[data-am-module] { | |
color: red; | |
} | |
[data-am-module~="blue"] { | |
color: blue; | |
} | |
[data-am-module~="large"] { | |
font-size: 2em; | |
} |
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 data-am-module=""> | |
data-am-module="" | |
</div> | |
<div data-am-module="blue"> | |
data-am-module="blue" | |
</div> | |
<div data-am-module="large"> | |
data-am-module="large" | |
</div> | |
<div data-am-module="large blue"> | |
data-am-module="large blue" | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment