Skip to content

Instantly share code, notes, and snippets.

@krisbulman
Last active August 29, 2015 14:19
Show Gist options
  • Save krisbulman/d86e217aca3aa8337b83 to your computer and use it in GitHub Desktop.
Save krisbulman/d86e217aca3aa8337b83 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.1.0)
// ----
@import 'susy';
$susy: (columns: 4);
$map: (columns: 4);
// doesn't work
@mixin inherit-layout($layout: 4) {
columns: $layout;
}
// works
@mixin inherit-susy-map($layout: map-get($susy, 'columns')) {
columns: $layout;
}
// doesn't work
@mixin inherit-my-map($layout: map-get($map, 'columns')) {
columns: $layout;
}
// No map specified
@include susy-breakpoint(30em) {
.global-cols {
@include inherit-layout();
@include inherit-susy-map();
@include inherit-my-map();
}
}
// Map specified
@include susy-breakpoint(48em, $layout: 8) {
.inherited-cols {
@include inherit-layout();
/* OMGWTFBBQ it inherited context, BUT WHY!? */
@include inherit-susy-map();
@include inherit-my-map();
}
}
@media (min-width: 30em) {
.global-cols {
columns: 4;
columns: 4;
columns: 4; } }
@media (min-width: 48em) {
.inherited-cols {
columns: 4;
/* OMGWTFBBQ it inherited context, BUT WHY!? */
columns: 8;
columns: 4; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment