Skip to content

Instantly share code, notes, and snippets.

@sheedy
Created October 24, 2015 05:22
Show Gist options
  • Save sheedy/6339e78cd3baea8f1990 to your computer and use it in GitHub Desktop.
Save sheedy/6339e78cd3baea8f1990 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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: "";
}
[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