Last active
August 29, 2015 14:01
-
-
Save storypixel/b4c078a41837b9c674a6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
.test { | |
color: orange; | |
} | |
@media only screen and (min-width: 1025px) and (max-width: 1440px) { | |
.test { | |
color: pink; | |
} | |
} | |
@media only screen { | |
.test { | |
color: blue; | |
} | |
} |
This file contains 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.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Breakpoints with SASS, my starting point | |
// Screen sizes | |
$small-screen: 640px; | |
$medium-screen: 1024px; | |
$large-screen: 1440px; | |
$xlarge-screen: 1920px; | |
// Ranges | |
$small: "only screen"; | |
$small-only: "only screen and (max-width:#{$small-screen})"; | |
$medium: "only screen and (min-width:#{$small-screen + 1})"; | |
$medium-only: "only screen and (min-width:#{$small-screen + 1}) and (max-width:#{$medium-screen})"; | |
$large: "only screen and (min-width:#{$medium-screen + 1})"; | |
$large-only: "only screen and (min-width:#{$medium-screen + 1}) and (max-width:#{$large-screen})"; | |
$xlarge: "only screen and (min-width:#{$large-screen + 1})"; | |
$xlarge-only: "only screen and (min-width:#{$large-screen + 1}) and (max-width:#{$xlarge-screen})"; | |
$xxlarge: "only screen and (min-width:#{$xlarge-screen + 1})"; | |
// Usage | |
.test{ | |
color: orange; | |
@media #{$large-only}{ | |
color: pink; | |
} | |
} | |
@media #{$small}{ | |
.test{ | |
color: blue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment