Skip to content

Instantly share code, notes, and snippets.

@robertlyall
Created November 7, 2014 11:39
Show Gist options
  • Save robertlyall/84c836e429243395baf5 to your computer and use it in GitHub Desktop.
Save robertlyall/84c836e429243395baf5 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
@function modifier($name)
@return "--#{$name}"
=component($name, $modifier)
@if $modifier != ""
$modifier: modifier($modifier)
.#{$name + $modifier}
@content
=button($name, $modifier: "")
+component($name, $modifier)
@content
+button("button")
padding: 10px 15px
+button("button", "large")
font-size: 1.5em
padding: 15px 20px
.button {
padding: 10px 15px;
}
.button--large {
font-size: 1.5em;
padding: 15px 20px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment