-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SASS mixins): media queries mixins now uses 0.1px instead of 1px…
… to avoid overlap (#3985) The `1px` overlap-avoidance between media queries created a `0.999...px` gap between mixin media queries. That is visible if user zooms in. This PR changes that to `0.1px` so you would have to zoom in more than 1000% in order to get a gap. ### Example: browser with 200% zoom and 640.5px with 1. `'small'` breakpoint `40em = 640px 3. `allBelow('small')` `0px to 640px` is narrower than `640.5px` 4. `allAbove('small')` `641px to infinity` is wider than `640.5px` 5. Changing `allAbove('small')` to `640.1px to infinity` includes `640.5px` ### Changes: * changed overlap-avoidance from `1px` to `0.1px` in both SASS mixins and react hooks. * updated documentation for "SASS and Mixins" and "Media Queries and Breakpints" to make it clearer that we do not include the minimum breakpoint in our intervals. ### other fixes: * fixed Portal Home button breakpoint off by 1 px * fixed a bug where you could not use any other unit than `em` for `allAbove` and `allBetween` mixin. * fixed a bug where `$breakpoint-offset`. was not used in `allBetween` mixin. * fixed a bug with parsing `'and'` in array sizes for `MediaQueryUtils.ts` * added a comment that `handheld` is a [deprecated](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#sect2) media-type in 'MediaQueryUtils.ts' (should we remove it?) --------- Co-authored-by: Tobias Høegh <tobias@tujo.no>
- Loading branch information
1 parent
c945d5b
commit 1cb495a
Showing
23 changed files
with
122 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.