-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Issue:
Using UseMediaQuery to support responsive layouts is a bad idea. Its just not worth the pain and effort. Media Query api doesn't works on server , which means if you are a Next JS guy, you are stuck with manually adding responsive classes in the CSS or inline or wait for someone to manually change viewport width.
Now thats alot of work, fortunately, someone has thought of this already and Ant design, has a good way of handling this. They Provide Breakpoints such as xs, sm, md,lg,xl,xxl on the grid's property to handle this on server and the client side. They do it on css side too but then its also handled on js side shall the viewport width change. Check this out:
https://ant.design/components/grid/
Thanks for reaching out!
Please provide following information:
- What package has an issue (@mantine/core, mantine/hooks or other)?
Core - What package version are you using?
Latest - In which browser and operating system issue occurred?
All Major - If possible please attach link to codesandbox with reproduced issue
No need, issue is clear - Do you have an idea how to fix the issue?
One work around is that you can check ant design grid system, supports SSR, allows you to specify gutter and grid size for each breakpoint - Are you willing to participate in fixing this issue (it's totally fine if not) and create a pull request with the fix?
-Of course