Created
October 24, 2015 05:22
-
-
Save sheedy/6339e78cd3baea8f1990 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
// ---- | |
// Sass (v3.4.4) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin am($args) { | |
@if length($args) == 1 { | |
[am-#{$args}] { | |
@content; | |
} | |
} | |
@else { | |
$val: (); | |
@for $i from 2 through length($args) { | |
$val: append($val, nth($args, $i)); | |
} | |
[am-#{nth($args, 1)}~="#{$val}"] { | |
@content; | |
} | |
} | |
} | |
// Usage | |
@include am(button) { | |
content: ""; | |
} | |
@include am(button large) { | |
content: ""; | |
} | |
@include am(button large rounded) { | |
content: ""; | |
} | |
@include am(row) { | |
content: ""; | |
} | |
@include am(column) { | |
content: ""; | |
} | |
@include am(column "1/12") { | |
content: ""; | |
} |
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
[am-button] { | |
content: ""; | |
} | |
[am-button~="large"] { | |
content: ""; | |
} | |
[am-button~="large rounded"] { | |
content: ""; | |
} | |
[am-row] { | |
content: ""; | |
} | |
[am-column] { | |
content: ""; | |
} | |
[am-column~="1/12"] { | |
content: ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment