Skip to content

Instantly share code, notes, and snippets.

@distractdiverge
Created February 11, 2014 14:32
Show Gist options
  • Save distractdiverge/8935886 to your computer and use it in GitHub Desktop.
Save distractdiverge/8935886 to your computer and use it in GitHub Desktop.
Abstracted Mixins for Responsive Sass (Desktop First)
@include 'compass';
@include 'breakpoint';
//
// Note all breakpoints are specified in Pixels, but Breakpoint will convert this to EMs for us.
//
$breakpoint-to-ems: true;
@mixin at-mobile-breakpoint() {
@include breakpoint(320px, 768px) {
@content;
}
}
@mixin at-tablet-breakpoint() {
@include breakpoint(768px, 1024px) {
@content;
}
}
// Desktop is Default Style
@mixin at-large-desktop-breakpoint() {
@include breakpoint(1200px) {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment