We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I expand the window slowly, the isMobile doesn't change to false.
isMobile
false
Add console.log(window.innerWidth, e.matches) get 767 false, but MOBILE_BREAKPOINT is 768, so setIsMobile is true.
console.log(window.innerWidth, e.matches)
767 false
MOBILE_BREAKPOINT
768
true
Use event.matches or mql.matches or <=?
event.matches
mql.matches
<=
I find a questions: html - Media query max-width not working inclusively - Stack Overflow. You can see: https://jsfiddle.net/e0hdyqc9/, the 767 is white.
767
Maybe with max-width when the number is even, media match includes the number; when the number is odd, media match doesn't include the number.
max-width
Sidebar
No response
Windows11, Edge
The text was updated successfully, but these errors were encountered:
useIsMobile
No branches or pull requests
Describe the bug
When I expand the window slowly, the
isMobile
doesn't change tofalse
.Add
console.log(window.innerWidth, e.matches)
get767 false
, butMOBILE_BREAKPOINT
is768
, so setIsMobile istrue
.Use
event.matches
ormql.matches
or?<=
I find a questions: html - Media query max-width not working inclusively - Stack Overflow. You can see: https://jsfiddle.net/e0hdyqc9/, the
767
is white.Maybe with
max-width
when the number is even, media match includes the number; when the number is odd, media match doesn't include the number.Affected component/components
Sidebar
How to reproduce
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: