Skip to content

Instantly share code, notes, and snippets.

@keithchu
keithchu / respond_to.sass
Created September 26, 2015 03:32
Responsive mixin for easy media queries
// define breakpoints
$small: #{"screen and (max-width: 479px)"}
$medium: #{"screen and (min-width: 480px) and (max-width: 767px)"}
$large: #{"screen and (min-width: 768px)"}
// define mixin
=respond-to($media...)
$media-list: null
@each $query in $media
$media-list: append($media-list, unquote("#{$query}"), comma)