5 ms·
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-
by Eric_WVGG 11y ago
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-vh-vmin-vmax/ https://web-design-weekly.com/2014/11/18/viewport-units-vw-v...
- talmand 11y agoOr, another option, using rem for font-sizes that bases the size off the font-size of the html element.
- Eric_WVGG 11y agoThat 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.
- LargeCompanies 11y agocool, do you have any examples of yours you can share?
- Eric_WVGG 11y agoI 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 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.
- hanniabu 11y agoMasterful, I love it. I can see how you broke this down and it simplifies things a great deal.