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

Incorrect breakpoint with useBreakpoint hook #389

Open
YassienW opened this issue Dec 19, 2022 · 3 comments
Open

Incorrect breakpoint with useBreakpoint hook #389

YassienW opened this issue Dec 19, 2022 · 3 comments

Comments

@YassienW
Copy link
Contributor

🐛 Bug Report

According to the documentation, md breakpoint should be returned at @media (min-width: 768px) { ... }. Instead it triggers at @media (min-width: 769px) { ... }

To Reproduce

  • Go to codesandbox link
  • Using dev tools, change device width to 768
  • Breakpoint shown on screen will be 'sm'

Expected behavior

  • Breakpoint shown on screen should be 'md'

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/confident-tdd-mhwndm?file=/src/App.js

## Binaries:
 - Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
 - Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn
 - npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
## npmPackages:
 - @xstyled/styled-components: ^3.6.0 => 3.7.0 
 - styled-components: ^5.3.5 => 5.3.6 
@agriffis
Copy link
Collaborator

@quantizor
Copy link
Collaborator

If one of you has time to submit a patch I’m happy to look at it!

@YassienW
Copy link
Contributor Author

It's simple enough, i'll make some time for it

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

No branches or pull requests

3 participants