Skip to content

Instantly share code, notes, and snippets.

@tujlaky
Created January 11, 2015 13:41
Show Gist options
  • Save tujlaky/ecd1caa4c6e47e40b6aa to your computer and use it in GitHub Desktop.
Save tujlaky/ecd1caa4c6e47e40b6aa to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
@function create-media-query($max-width: '', $min-width: '', $responsive: false, $dpr: 1.5, $media: 'only-screen') {
$query: '@media ' + $media + ' ';
@if $min-width {
$query: $query + ' and (min-width: ' + $min-width + ')';
}
@if $max-width {
$query: $query + ' and (max-width: ' + $max-width + ')';
}
@if $retina {
// TODO: add min-resolution
$query: $query + '(-webkit-min-device-pixel-ratio: ' + $dpr + ')';
}
@return $query;
};
@mixin screen($width, $height, $retina: false) {
create-media-query($width, $height, $retina) {
@content
}
}
.test {
@include screen(1024, 768) {
width: 100%;
}
}
Invalid CSS after "create-media-query": expected selector, was "($width, $heigh..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment