Skip to content

Instantly share code, notes, and snippets.

@nukos
Last active November 12, 2016 08:46
Show Gist options
  • Save nukos/5c83bb61d4903f01ff77a414786e1334 to your computer and use it in GitHub Desktop.
Save nukos/5c83bb61d4903f01ff77a414786e1334 to your computer and use it in GitHub Desktop.
$mix-data-state-prefix: 'is' !default;
$mix-data-state-attr: 'data' !default;
@mixin data-state($name, $state: true, $attr: $mix-data-state-attr, $prefix: $mix-data-state-prefix) {
&[#{$attr}-#{$prefix}-#{$name}=#{$state}] {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment