DEV Community

Discussion on: Does HTML Grid replace media queries?

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

Hi my friend, there are loads of things that media queries can perform well and grid / flex cannot.
Most important is the typo size on different resolutions, on UX some had tried to use ems or rems but aren't good to reach the expected on any size.
Then you will found some caveats while using grid / flex only. For example you may want some content to display reverse on phone by importance or whatever, so you can add a media query and set flex-direction: row reverse; Which is flex but you'll need a media for setting it up.

Another thing to take in mind are the interaction of the user with your web app, that will be so different between having a mouse and a keyboard or having only your fingers.

At this point I prefer to use flex with some media queries; I'm building a SCSS framework that uses flex for the basic layout (at this moment it needs a refactor to use all fancy Sass tools, but it's almost ready) I'll share it when finished :D

Collapse
 
jwp profile image
John Peters

Thank you , @joelbonetr I updated the article to include your comment!