[SOLVED!] Use "em" for font sizer
Posted
#6274
(In Topic #1356)
The font sizer affects font sizes. I wanted to change my fonts from how they were to using "em" for even better responsability to differnt resolutions and screen sizes. Of course the better might be using rem, but that requires a little more work and I think em works just fine. Anyways.....
I went into the font sizer tpl file and noticed that it just gives numbers but no way to indicate the unit being used. I thought maybe it would reference a different css file or line, but have yet to find it.
So great ones, how can I change the font sizer to use ems instead. I'd like to go for something like 0.5 em, 1 em, and maybe 1.25 or 1.5 em. Not sure yet until I play around with it. Or will I have to somehow disable it?
Thanks in advance.
Last edit: by mythus
Posted
Code
function set_font_size(size)
{
var old_size=read_cookie('font_size');
var old_sizer=document.getElementById('font_size_'+old_size);
if (old_sizer) old_sizer.className=old_sizer.className.replace(/ selected/g,'');
document.body.style.fontSize=size+'px';
set_cookie('font_size',size,120);
var new_sizer=document.getElementById('font_size_'+size);
if (new_sizer) new_sizer.className+=' selected';
}
(No need to reply unless you wanted to, I just wanted to check this myself too)
Posted
Code
.font_sizer_small {
font-size: 0.5em;
}
.font_sizer_medium {
font-size: 1em;
}
.font_sizer_large {
font-size: 1.5em;
}
That makes me wonder if it did anything at all, or only changed the little font sizer icons instead of actually doing what I set out to do. Hmm lol.
Posted
2 guests and 0 members have recently viewed this.
