Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So, flex looks to be a better way to create/handle responsive design; rely less on bootstrap and stuff?

On a similar note Im curious if there is a responsive typography framework that's out there and people are using? A framework where the text automatically shrinks down without having to change the font-size in various media queries?



yeah look into vw, vh, vmin, and vmax measurements. They’re fantastic and surprisingly well-supported.

https://web-design-weekly.com/2014/11/18/viewport-units-vw-v...


Or, another option, using rem for font-sizes that bases the size off the font-size of the html element.


That solves a different problem. REM is useful for making the value relative to a master value; v-units make the value relative to the viewport.

I actually use the two in conjunction. I set some my html {font-size: 1.2vw;} (or whatever), and all type in the document to 1rem (or whatever measurement). Then I finally step out the html size to major browser breakpoints using old-fashioned media queries.


cool, do you have any examples of yours you can share?


I can’t share my recent stuff because it’s still under private development, but here’s the results of my first experiments in this method, a little rough around the edges but etc.

http://midcenturymay.nyc

The "master" type size is set to a vh unit, everything else is rem’d off that, and stepped via media query.


Masterful, I love it. I can see how you broke this down and it simplifies things a great deal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: