Skip to content

Instantly share code, notes, and snippets.

@csswizardry
Created September 8, 2014 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csswizardry/cbfc2b089ded48f2e122 to your computer and use it in GitHub Desktop.
Save csswizardry/cbfc2b089ded48f2e122 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
@mixin am($attribute, $value: null) {
@if($value != null) {
$value: "~=\"#{$value}\"";
}
[am-#{$attribute}#{$value}] {
@content
}
}
@include am(Button) {
display: inline-block;
}
@include am(Button, positive) {
background-color: green;
}
@include am(Masthead, banner) {
min-height: 480px;
@include am(Site-nav) {
width: 100%;
}
}
[am-Button] {
display: inline-block;
}
[am-Button~="positive"] {
background-color: green;
}
[am-Masthead~="banner"] {
min-height: 480px;
}
[am-Masthead~="banner"] [am-Site-nav] {
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment