wir
5/19/2015 - 6:36 AM

rem-calibrate.css

/*
	Place this within a <script> in your <head>, prior to your stylesheet
	Then use rems instead of px globally - your site will scale 1:1 with viewport width
*/

function remCalibrate() {
	document.documentElement.style.fontSize = window.innerWidth/100 + 'px';
} 
remCalibrate();
window.addEventListener('resize', remCalibrate, false);
/* Android stock browser won't let you set font-size smaller than 8px unless you apply this. */

:root {
	-webkit-text-size-adjust: none;
	-moz-text-size-adjust: none;
	-ms-text-size-adjust: none;
	-o-text-size-adjust: none;
	text-size-adjust: none;
}