Last active
August 29, 2015 14:09
-
-
Save tomkrush/f8f0d534721edf3d4061 to your computer and use it in GitHub Desktop.
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
$media-products-list: "only screen and (max-width : 499px)"; | |
$media-products-grid: "only screen and (min-width : 500px)"; | |
$media-products-grid-compact: "only screen and (min-width : 500px max-width 767px)"; | |
$media-products-grid-compact-expanded: "only screen and (min-width : 768px)"; | |
@mixin use-query($query) { | |
@media #{$query} { | |
@content; | |
} | |
} | |
.product { | |
@include use-query($media-products-list) { | |
width: 100%; | |
padding: 10px 15px; | |
} | |
@include use-query($media-products-grid) { | |
float: left; | |
} | |
@include use-query($media-products-grid-compact) { | |
width: 1/2 * 100%; | |
} | |
@include use-query($media-products-grid-compact-expanded) { | |
width: 1/4 * 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment