Skip to content

Instantly share code, notes, and snippets.

@elijahmanor
Created June 11, 2014 18:05
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 elijahmanor/699a01254fe73972c23a to your computer and use it in GitHub Desktop.
Save elijahmanor/699a01254fe73972c23a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// Scut (v0.10.4)
// ----
@import "scut";
$breakpoints: (
palm: 24em,
lap: 30em,
desk: 40em
);
$fixed-breakpoint: false !default;
$oldIE: false !default;
@mixin respond-to($name) {
@if map-has-key($breakpoints, $name) {
$breakpoint: map-get($breakpoints, $name);
@if $fixed-breakpoint and $fixed-breakpoint >= $breakpoint {
@media all { @content; }
} @else {
@media all and (min-width: $breakpoint) {
@content;
}
}
} @else {
@warn 'respond-to: `{$name}` is not defined in `$breakpoints`';
}
}
@mixin old-ie {
@if $oldIE {
@media all {
@content;
}
}
}
@include respond-to(palm) {
color: red;
}
@include respond-to(lap) {
color: orange;
}
@include respond-to(desk) {
color: yellow;
}
@include respond-to(bogus) {
color: green;
}
@include old-ie {
color: blue;
}
$fixed-breakpoint: 24em;
@include respond-to(palm) {
color: indigo;
}
//$oldIE: true;
@include old-ie {
color: violet;
}
/*
* Scut, a collection of Sass utilities
* to ease and improve our implementations of common style-code patterns.
* v0.10.4
* Docs at http://davidtheclark.github.io/scut
*/
@media all and (min-width: 24em) {
color: red;
}
@media all and (min-width: 30em) {
color: orange;
}
@media all and (min-width: 40em) {
color: yellow;
}
@media all {
color: indigo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment