From a3a6262570a3ff7ae5609c09d3495a5525f706fb Mon Sep 17 00:00:00 2001 From: Joe Workman Date: Thu, 5 Dec 2019 13:57:47 -0800 Subject: [PATCH] Simplified breakpoint print if logic as agree to 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scss/util/_breakpoint.scss b/scss/util/_breakpoint.scss index 3264741c8..a0cebeee0 100644 --- a/scss/util/_breakpoint.scss +++ b/scss/util/_breakpoint.scss @@ -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; } -- 2.47.2