Skip to content

Instantly share code, notes, and snippets.

@marypieroszkiewicz
Created March 22, 2019 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marypieroszkiewicz/aca2fc6ade44d5e260601a10c852ff4e to your computer and use it in GitHub Desktop.
Save marypieroszkiewicz/aca2fc6ade44d5e260601a10c852ff4e to your computer and use it in GitHub Desktop.
// VARIABLES - Media Queries
$mobile__420: "only screen and (max-width: 420px)";
$tablet__860: "only screen and (min-width: 860px)";
$desktop__1200: "only screen and (min-width: 1200px)";
$high-screen__1440: "only screen and (min-width: 1440px)";
// MIXIN RWD
@mixin for-size($size) {
@if $size == mobile {
@media #{$mobile__420} {
@content;
}
}
@else if $size == tablet {
@media #{$tablet__860} {
@content;
}
}
@else if $size == desktop {
@media #{$desktop__1200} {
@content;
}
}
@else if $size == high-screen {
@media #{$high-screen__1440} {
@content;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment