Re: Looks and Appearances
Reply #20 –
Very nice. I think the quote had wrong font size before, but it's fixed now.
By the way, I didn't change anything about that. However, I did create a potential workaround for the user-defined font-size dilemma:
var iframe = document.createElement('iframe');
iframe.style.display = 'none';
document.body.appendChild(iframe);
var iframeWindow = iframe.contentWindow || iframe.documentWindow; // the latter is for old IE
var iframeDoc = iframeWindow.document;
var fontSize = getComputedStyle(iframeDoc.documentElement).getPropertyValue('font-size');
if (fontSize === '16px') {
// assume the user didn't change the default
// set font-size to 13px
}
else {
// respect what the user said
// Also this is stupid. It shouldn't have to be this hard to provide some proper user choice. >_< This is your fault, everyone who ever used 67%, and this is also your fault, browser makers who implemented rem (as opposed to em) over a decade too late.
}