Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add the print media query for the right media query combinations #10979
fix: add the print media query for the right media query combinations #10979
Changes from 1 commit
36a199f
a3a6262
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move this to a cleaner "breakpoint compairaison" function. Putting all the cases here in a
if
is really confusing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. Could need some assistance here as I've not often written mixins and functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take care of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... this weekend :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanielRuf @ncoden I'm not sure if this line has to be changed at all... what is the goal?
The comment says 'for named breakpoints less than or equal to $print-breakpoint' what I interpreted as starting point . The original
@include breakpoint(large)
was actually a@include breakpoint(large up)
and thus also affects breakpoints greater than large.So is the goal that
breakpoint(large only)
andbreakpoint(large down)
do affect print butbreakpoint(large)
does not? (although this would be a breaking change)If not the condition
$bp != null and $bp <= $pbp
doesn't need to be changed imoThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some trouble to retrieve the problem here and the purpose of this change as we are working with confusing intervals here, but I think I got it.
If I understand
$print-breakpoint
correctly, it must be used to preventprint
to consider highest breakpoints because, despite the high resolution of the paper (which is good for reading), this is not a good support for small interfaces and interactive elements. Paper should almost be considered as a tablet giving a fake resolution (like iPads, but we are faking the resolution).Following this, the objective is to make printable the styles applied on
$print-breakpoint
or below like if higher breakpoints did not exists. This means that, for$print-breakpoint: large;
:large up/only/down
,medium up/only/down
,xlarge down
should be printable because their styles are applied to a large (or smaller) screen so we should consider them as displayable on a large (or smaller) print support.xlarge only/up
should be not printable like before.@SassNinja What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok @ncoden so the rule would be 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.
Since @DanielRuf has already added
$dir
I would simply change the condition toThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and we can add an explantation comment and a link to the comment here. @DanielRuf What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I might have thought to complex. Not sure what I covered that would not be covered by the simple
or
condition. 🤔