_sass/primer-support/lib/mixins/layout.scss in jekyll-theme-primer-0.5.3 vs _sass/primer-support/lib/mixins/layout.scss in jekyll-theme-primer-0.5.4
- old
+ new
@@ -1,22 +1,28 @@
// Responsive media queries
@mixin breakpoint($breakpoint) {
- // Retrieves the value from the key
- $value: map-get($breakpoints, $breakpoint);
-
- // If the key exists in the map
- @if $value != null {
- // Prints a media query based on the value
- @media (min-width: $value) {
- @content;
- }
+ @if $breakpoint == "" {
+ @content;
}
- // If the key doesn't exist in the map
@else {
- @warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
- + "Please make sure it is defined in `$breakpoints` map.";
+ // Retrieves the value from the key
+ $value: map-get($breakpoints, $breakpoint);
+
+ // If the key exists in the map
+ @if $value != null {
+ // Prints a media query based on the value
+ @media (min-width: $value) {
+ @content;
+ }
+ }
+
+ // If the key doesn't exist in the map
+ @else {
+ @warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
+ + "Please make sure it is defined in `$breakpoints` map.";
+ }
}
}
// Retina media query