Skip to content

Instantly share code, notes, and snippets.

@MichaelArestad
Created November 27, 2014 14:02
Show Gist options
  • Save MichaelArestad/ddfeab22986a0fe59891 to your computer and use it in GitHub Desktop.
Save MichaelArestad/ddfeab22986a0fe59891 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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 );
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