Skip to content

Instantly share code, notes, and snippets.

@KittyGiraudel
Created January 27, 2014 18:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save KittyGiraudel/8653970 to your computer and use it in GitHub Desktop.
Save KittyGiraudel/8653970 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// A mixin of yours
@mixin app($conf: ()) {
// What could be the defaults parameter for your mixin
$conf: map-merge((
speed : 1000,
theme : dark,
name : 'default',
duration : 250ms,
width : 100%,
widget : modular
), $conf);
// Do something with the configuration objecy
test: inspect($conf);
}
test {
// Including the mixin with a custom conf object
@include app((
speed: 500,
theme: light,
name: 'test'
));
// Or full default if you don't feel like specifying any parameter
@include app();
}
test {
test: (speed: 500, theme: light, name: "test", duration: 250ms, width: 100%, widget: modular);
test: (speed: 1000, theme: dark, name: "default", duration: 250ms, width: 100%, widget: modular);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment