Last active
August 29, 2015 14:09
-
-
Save mikefowler/3c42d6d1db180ad57ead 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
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
$screen-md: 768px; | |
$screen-lg: 1100px; | |
// ---------------------------------------------------------------------------- | |
// Mixins | |
// ---------------------------------------------------------------------------- | |
@mixin above($size) { | |
$breakpoint: false; | |
@if $size == 'sm' { | |
$breakpoint: $screen-md; | |
} @else if $size == 'md' { | |
$breakpoint: $screen-lg; | |
} | |
@if $breakpoint { | |
@media (min-width: $breakpoint) { | |
@content; | |
} | |
} | |
} | |
@mixin below($size) { | |
$breakpoint: false; | |
@if $size == 'lg' { | |
$breakpoint: $screen-lg; | |
} @else if $size == 'md' { | |
$breakpoint: $screen-md; | |
} | |
@if $breakpoint { | |
// Pull one pixel off the breakpoint | |
// since we're doing a max-width query | |
$breakpoint: $breakpoint - 1px; | |
@media (max-width: $breakpoint) { | |
@content; | |
} | |
} | |
} | |
@mixin at($size) { | |
@if $size == 'sm' { | |
@include below('md') { | |
@content; | |
} | |
} @else if $size == 'md' { | |
@media (min-width: $screen-md) and (max-width: ($screen-lg - 1px)) { | |
@content; | |
} | |
} @else if $size == 'lg' { | |
@include above('md') { | |
@content; | |
} | |
} | |
} | |
/* @include above('sm') */ | |
@include above('sm') { | |
content: "" | |
} | |
/* @include above('md') */ | |
@include above('md') { | |
content: ""; | |
} | |
/* @include above('lg') INVALID */ | |
@include above('lg') { | |
content: "DOES NOT OUTPUT"; | |
} | |
/* @include below('lg') */ | |
@include below('lg') { | |
content: ""; | |
} | |
/* @include below('md') */ | |
@include below('md') { | |
content: ""; | |
} | |
/* @include below('sm') */ | |
@include below('sm') { | |
content: "DOES NOT OUTPUT"; | |
} | |
/* @include at('sm') */ | |
@include at('sm') { | |
content: ""; | |
} | |
/* @include at('md') */ | |
@include at('md') { | |
content: ""; | |
} | |
/* @include at('lg') */ | |
@include at('lg') { | |
content: ""; | |
} |
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
/* @include above('sm') */ | |
@media (min-width: 768px) { | |
content: ""; | |
} | |
/* @include above('md') */ | |
@media (min-width: 1100px) { | |
content: ""; | |
} | |
/* @include above('lg') INVALID */ | |
/* @include below('lg') */ | |
@media (max-width: 1099px) { | |
content: ""; | |
} | |
/* @include below('md') */ | |
@media (max-width: 767px) { | |
content: ""; | |
} | |
/* @include below('sm') */ | |
/* @include at('sm') */ | |
@media (max-width: 767px) { | |
content: ""; | |
} | |
/* @include at('md') */ | |
@media (min-width: 768px) and (max-width: 1099px) { | |
content: ""; | |
} | |
/* @include at('lg') */ | |
@media (min-width: 1100px) { | |
content: ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment