Created
November 27, 2014 14:02
-
-
Save MichaelArestad/ddfeab22986a0fe59891 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin media( $width ) { | |
@if variable-exists( mq-list ){} @else { | |
$mq-list:() !global; | |
} | |
@if map-has-key( $mq-list, $width ) {} @else { | |
$mq-list: append( $mq-list, ( $width ) ) !global; | |
} | |
$selector: selector-parse(&) !global; | |
$content: @content; // doesn't work | |
$mq-list: map-merge( map-get( $mq-list, $width), ( $selector: $content )) !global; | |
} | |
@mixin media-group( $width ) { | |
@each $selector, $content in map-get( $mq-list, $width ) { | |
#{$selector} { | |
$content; | |
} | |
} | |
} | |
.b { | |
.a & .c { | |
@include media( 660px ){ | |
background: red; | |
} | |
} | |
} | |
@include media-group( 660px ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invalid CSS after " $content: ": expected expression (e.g. 1px, bold), was "@content; // do..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment