Skip to content

Commit

Permalink
Simplified breakpoint print if logic as agree to
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joeworkman authored Dec 5, 2019
1 parent 36a199f commit a3a6262
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scss/util/_breakpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a3a6262

Please # to comment.