]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Simplified breakpoint print if logic as agree to 10979/head
authorJoe Workman <joe@workmanmail.com>
Thu, 5 Dec 2019 21:57:47 +0000 (13:57 -0800)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2019 21:57:47 +0000 (13:57 -0800)
generate print if the breakpoint affects the print-breakpoint (or smaller).
This means the current condition only needs to be extended so 'down' always generates print.

scss/util/_breakpoint.scss

index 3264741c8a892ce2652833141a86ba484302c2d1..a0cebeee0382f0db70dd4975e2419a5e7e50f184 100644 (file)
@@ -168,7 +168,9 @@ $breakpoint-classes: (small medium large) !default;
     // Otherwise, wrap the content in a media query
     @else {
       // For named breakpoints less than or equal to $print-breakpoint, add print to the media types
-      @if ($bp != null and $bp == $pbp and ($dir == '' or $dir == 'up' or $dir == 'only')) or ($bp != null and $bp < $pbp and ($dir == '' or $dir == 'up'))  or ($bp != null and $bp >= $pbp and ($dir == 'down')) {
+      // generate print if the breakpoint affects the print-breakpoint (or smaller).
+      // This means the current condition only needs to be extended so 'down' always generates print.
+      @if $bp != null and ($bp <= $pbp or $dir == down) {
         @media print, screen and #{$str} {
           @content;
         }