Skip to content

Instantly share code, notes, and snippets.

@alxjrvs
Created October 8, 2014 02:39
Show Gist options
  • Save alxjrvs/f34c02f73069c5fcd6af to your computer and use it in GitHub Desktop.
Save alxjrvs/f34c02f73069c5fcd6af to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
.button
Click
.button--error
Error
.button--success
Success
.button--pending
Pending
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
// Lists are basically arrays.
%button {
height: 100px;
width: 200px;
}
$button-suffixes: ('dark', 'light', 'success', 'error');
.button {
@extend %button;
@each $suffix in $button-suffixes {
&--#{$suffix} {
@extend %button;
content: $suffix;
}
}
}
.button, .button--dark, .button--light, .button--success, .button--error {
height: 100px;
width: 200px;
}
.button--dark {
content: "dark";
}
.button--light {
content: "light";
}
.button--success {
content: "success";
}
.button--error {
content: "error";
}
.button
Click
.button--error
Error
.button--success
Success
.button--pending
Pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment