Skip to content
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(utils): reduce gaps in media queries for breakpoints #6744

Merged
merged 3 commits into from Dec 21, 2022

Conversation

joseph082
Copy link
Contributor

@joseph082 joseph082 commented Sep 23, 2022

Closes #6743

📝 Description

Fixes useBreakpointValue and useBreakpoint hooks by reducing the gaps in the hooks' media queries. These gaps excluded certain viewport widths.

⛳️ Current behavior (updates)

Media queries generated from theme breakpoints do not cover certain viewport widths due to the 1px and .0625em gaps.

🚀 New behavior

Media queries generated from theme breakpoints cover almost all viewport widths by reducing the gaps to .02px and .01em.

💣 Is this a breaking change (Yes/No):

No

It looks like this PR being refactored broke the hook(s) in Firefox due to the gaps for em being changed to be smaller. The core team member who fixed it says to use @chakra-ui/react@2.4.7

@changeset-bot
Copy link

changeset-bot bot commented Sep 23, 2022

🦋 Changeset detected

Latest commit: 0e00ca5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@chakra-ui/media-query Patch
@chakra-ui/skeleton Patch
@chakra-ui/styled-system Patch
@chakra-ui/utils Patch
@chakra-ui/breakpoint-utils Patch
@chakra-ui/react Patch
@chakra-ui/toast Patch
@chakra-ui/system Patch
@chakra-ui/theme-utils Patch
@chakra-ui/props-docs Patch
@chakra-ui/provider Patch
@chakra-ui/hooks Patch
@chakra-ui/react-utils Patch
@chakra-ui/test-utils Patch
@chakra-ui/layout Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
chakra-ui-storybook ✅ Ready (Inspect) Visit Preview Dec 21, 2022 at 10:49AM (UTC)

@seanhuggins1
Copy link

Ran into this issue, what needs to be done to get this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Media query gaps break useBreakpointValue and useBreakpoint hooks
3 participants