Created
November 30, 2014 08:33
-
-
Save mistergraphx/d62872c230762fd48368 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.2.19) | |
// Compass (v0.12.6) | |
// ---- | |
$mediaqueries-support: true !default; | |
// Predefined Break-points | |
$desktop: 1260px !default; | |
$tablet: 960px !default; | |
$phone: 480px !default; | |
@function translate-media-condition($c) { | |
$condMap: ( | |
"screen": "only screen", | |
"print": "only print", | |
"retina": "(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-device-pixel-ratio: 1.5), (min-resolution: 120dpi)", | |
">desktop": "(min-width: #{$desktop + 1})", | |
"<desktop": "(max-width: #{$desktop})", | |
">tablet": "(min-width: #{$tablet + 1})", | |
"<tablet": "(max-width: #{$tablet})", | |
">phone": "(min-width: #{$phone + 1})", | |
"<phone": "(max-width: #{$phone})", | |
); | |
@return map-get( $condMap, $c ); | |
} | |
// The media mixin | |
@mixin media($args...) { | |
@if ($mediaqueries-support) { | |
$query: ""; | |
@each $arg in $args { | |
$op: ""; | |
@if ( $query != "" ) { | |
$op: " and "; | |
} | |
$query: $query + $op + translate-media-condition($arg); | |
} | |
@media #{$query} { | |
@content; | |
} | |
} | |
} |
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 "... "screen"": expected ")", was ": "only screen"," |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment