Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #367 from Shopify/jtgrenz-make-at-query-intuitive
Browse files Browse the repository at this point in the history
Make the at-query more intuitive for min-max calls
  • Loading branch information
cshold committed Mar 18, 2015
2 parents 1049afc + 4e8be80 commit 87a5a4b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions assets/timber.scss.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,16 @@ $socialIconFontStack: 'icons';

/*============================================================================
Dependency-free breakpoint mixin
- http://blog.grayghostvisuals.com/sass/sass-media-query-mixin/
- Based on http://blog.grayghostvisuals.com/sass/sass-media-query-mixin/
- Usage docs: http://shopify.github.io/Timber/#sass-mixins
==============================================================================*/
$min: min-width;
$max: max-width;
@mixin at-query ($constraint, $viewport1, $viewport2:null) {
@mixin at-query ($constraint_, $viewport1_, $viewport2_:null) {
$constraint: $constraint_; $viewport1: $viewport1_; $viewport2: $viewport2_;
@if type-of($constraint_) == number {
$viewport1 : $constraint_; $viewport2 : $viewport1_; $constraint : null;
}
@if $constraint == $min {
@media screen and ($min: $viewport1) {
@content;
Expand Down

0 comments on commit 87a5a4b

Please sign in to comment.