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
bug(Breakpoints): Incorrect upper boundary lead to wrong match result #20850
Labels
area: cdk/layout
help wanted
The team would appreciate a PR from the community to address this issue
P4
A relatively minor issue that is not relevant to core functions
Comments
tomrlq
changed the title
bug(Breakpoints): Incorrect upper boundary number lead to wrong match result
bug(Breakpoints): Incorrect upper boundary lead to wrong match result
Oct 22, 2020
jelbourn
added
area: cdk/layout
help wanted
The team would appreciate a PR from the community to address this issue
P4
A relatively minor issue that is not relevant to core functions
and removed
needs triage
This issue needs to be triaged by the team
labels
Oct 22, 2020
Confirmed that |
tomrlq
added a commit
to tomrlq/components
that referenced
this issue
Oct 23, 2020
#20866 |
tomrlq
added a commit
to tomrlq/components
that referenced
this issue
Oct 26, 2020
The previous breakpoint upper bounds use `.99` for the fractional components of upper bounds. However, this seems to cause browser to round up to the next pixel, creating an overlap for these values. Changing to `.98` fixes this. Fixes angular#20850
annieyw
pushed a commit
that referenced
this issue
Nov 3, 2020
The previous breakpoint upper bounds use `.99` for the fractional components of upper bounds. However, this seems to cause browser to round up to the next pixel, creating an overlap for these values. Changing to `.98` fixes this. Fixes #20850
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this issue
Jan 14, 2021
The previous breakpoint upper bounds use `.99` for the fractional components of upper bounds. However, this seems to cause browser to round up to the next pixel, creating an overlap for these values. Changing to `.98` fixes this. Fixes angular#20850
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: cdk/layout
help wanted
The team would appreciate a PR from the community to address this issue
P4
A relatively minor issue that is not relevant to core functions
Reproduction
Use StackBlitz to reproduce your issue: https://components-issue-r4nh9s.stackblitz.io
Steps to reproduce:
Expected Behavior
matching result should be false
Actual Behavior
matching result is true
Environment
How to fix
If we take a look at Bootstrap's source code, we can see that, their upper boundary is using numbers like xxx.98, while in Angular Material, the upper boundary is using numbers like xxx.99, and this lead to the bug.
I take size 960*600 as example, in browser, if you match something like
browser will give you true, only if you match something like
browser will give you false
The text was updated successfully, but these errors were encountered: