This repository was archived by the owner on Jan 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 768
Sub-Pixel calculation issue #1001
Labels
discussion
Further discussion with the team is needed before proceeding
has pr
A PR has been created to address this issue
help wanted
The team would appreciate a PR from the community to address this issue
P5
Low-priority issue that needs consideration
Milestone
Comments
In an absolutely ideal world, we would switch the syntax for our media queries to use Media Query Level 4 syntax ( I'll discuss modifying the media queries with @ThomasBurleson. In the meantime, if you'd like to submit a PR for this, we'd be happy to review it when ready. |
ThomasBurleson
added a commit
that referenced
this issue
Jan 21, 2019
In rare cases, browsers resizing my create viewports with subpixel values. Previous mediaQueries had 1 pixel gaps where the bounding ranges do not match. Update the `max-width` values to include subpixel values and eliminate 99.99% of all gaps. Fixes #1001.
ThomasBurleson
added a commit
that referenced
this issue
Jan 21, 2019
In rare cases, browsers resizing my create viewports with subpixel values. Previous mediaQueries had 1 pixel gaps where the bounding ranges do not match. Update the `max-width` values to include subpixel values and eliminate 99.99% of all gaps. Fixes #1001.
CaerusKaru
pushed a commit
that referenced
this issue
Jan 21, 2019
In rare cases, browsers resizing may create viewports with subpixel values. Previous mediaQueries had 1 pixel gaps where the bounding ranges do not match. Update the `max-width` values to include subpixel values and eliminate 99.99% of all gaps. Fixes #1001.
ThomasBurleson
added a commit
that referenced
this issue
Jan 23, 2019
@angular/cdk BreakpointObserver will not replace `MediaObserver`. **MediaObserver** is an enhanced version that notifies subscribers of activations for standard AND **overlapping (lt-xxx, gt-xxx)** breakpoints. * Ensure standard breakpoints mediaQueries are aligned with those in the CDK * Update MediaObserver * isActive() enhanced to support list of aliases to determine if any match * properly disconnects subscribers when destroyed > Note: Developers should use MediaObserver (not use MatchMedia) service to observe breakpoint activations! MediaObserver is the recommended service to use for application developers; MatchMedia should be considered a private service. Fixes #685. Refs #1001.
CaerusKaru
pushed a commit
that referenced
this issue
Jan 23, 2019
@angular/cdk BreakpointObserver will not replace `MediaObserver`. **MediaObserver** is an enhanced version that notifies subscribers of activations for standard AND **overlapping (lt-xxx, gt-xxx)** breakpoints. * Ensure standard breakpoints mediaQueries are aligned with those in the CDK * Update MediaObserver * isActive() enhanced to support list of aliases to determine if any match * properly disconnects subscribers when destroyed > Note: Developers should use MediaObserver (not use MatchMedia) service to observe breakpoint activations! MediaObserver is the recommended service to use for application developers; MatchMedia should be considered a private service. Fixes #685. Refs #1001.
CaerusKaru
pushed a commit
that referenced
this issue
May 30, 2019
In Chrome, .99 is treated as 1 which cause ranges to overlap at the exact breakpoint. > Note: the behavior might not be considered as a bug in chrome as in [W3 specifications](https://www.w3.org/TR/mediaqueries-4/#mq-min-max) it's mentioned that for sub-pixels or fractions it's preferred to use [the not widely supported range context](https://www.w3.org/TR/mediaqueries-4/#range-context). Fixes #1052. Affects #1001.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
discussion
Further discussion with the team is needed before proceeding
has pr
A PR has been created to address this issue
help wanted
The team would appreciate a PR from the community to address this issue
P5
Low-priority issue that needs consideration
Bug Report
What is the expected behavior?
No problems caused by subpixel calculations by browsers.
What is the current behavior?
If the browser ends up with the width of the viewport set to something like 1279.5px then neither the md nor the lg breakpoints match.
What are the steps to reproduce?
Here's a codepen showing the issue using basic CSS but same applies to this library: https://codepen.io/anon/pen/VqoGXP
What is the use-case or motivation for changing an existing behavior?
This really starts to apply to higher density screens with scaling turned of (such as a 2160p monitor with Windows set to 150% scaling and using 2 browsers on each half of the screen).
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
All.
Is there anything else we should know?
The fix is pretty simple, just add
.9999
to the end of all the pixel values that are 1px less than the next break point (e.g. the md breakpoint max-width would be set to 1279.9999px).The text was updated successfully, but these errors were encountered: