Creating SASS mixins aliases
<button>Alerted</button>
body:after {
content: 'hai'; }
// ----
// libsass (v0.7.0)
// ----
// Long mixin name from a library, probably prefixed with a
// namespace to avoid naming clashes. This is a pain to type
// out all the time
@mixin i-am-a-mixin-with-a-long-name($arg1, $arg2) {
body:after {
content: $arg2;
}
}
// Create a alias mixin with a shorter name that passes
// through all the arguments to the longer named mixin
// The docs for what the ... syntax is can be found at
// http://sass-lang.com/documentation/file.SASS_REFERENCE.html#variable_arguments
@mixin alias($args...) {
@include i-am-a-mixin-with-a-long-name($args...)
}
// Now you can reference your short alias in your project!
@include alias('blah', 'hai');
<button>Alerted</button>