Permalink
Browse files

Allowing for an as-needed no-query fallback

  • Loading branch information...
1 parent a18d116 commit 81367d2883578c5e8fb6d2948818239b544c58a1 @Snugug Snugug committed Apr 8, 2013
Showing with 8 additions and 4 deletions.
  1. +6 −2 stylesheets/_breakpoint.scss
  2. +2 −2 stylesheets/breakpoint/_respond-to.scss
@@ -35,7 +35,7 @@ $breakpoint-legacy-syntax: false !default;
// Breakpoint Mixin
//////////////////////////////
-@mixin breakpoint($query) {
+@mixin breakpoint($query, $no-query: false) {
// Internal Variables
$query-string: '';
@@ -91,9 +91,13 @@ $breakpoint-legacy-syntax: false !default;
}
}
+ // Allow for an as-needed override or usage of no query fallback.
+ @if $no-query != false {
+ $query-fallback: $no-query;
+ }
- // Print Out Query String
+ // Print Out Query String
@if not $breakpoint-no-queries {
@media #{$query-string} {
@content;
@@ -7,7 +7,7 @@ $breakpoints: () !default;
// Respond-to API Mixin
////////////////////////
-@mixin respond-to($context) {
+@mixin respond-to($context, $no-query: false) {
@if type-of($breakpoints) != 'list' {
// Just in case someone writes gibberish to the $breakpoints variable.
@warn "Your breakpoints aren't a list! See https://github.com/snugug/respond-to#api if you'd like a reminder on how to use Respond-to";
@@ -33,7 +33,7 @@ $breakpoints: () !default;
}
}
- @include breakpoint($mq) {
+ @include breakpoint($mq, $no-query) {
@content;
}
}

0 comments on commit 81367d2

Please sign in to comment.