[dojo-contributors] Text sizing using em

Nathan Toone toonetown at dojotoolkit.org
Tue May 6 22:44:11 EDT 2008

I think I may understand what Nikolai meant by "consistent"

Let's say you have a button - and the text is styled for it at .75 em.
That button, when in a div (or another widget, etc.) with size of 1em
would be roughly 12px (for easy math).  That same button within a div
that has text size of 7.75px (.75*9 - the size of the containing div)

I'm not advocating one way over the other (though my personal
preference is to use all em measurements). It's just important that
whichever way is chosen, it's documented well enough and developers
know the consequences of their actions.

I, for one actually think that the expected behavior would be to
reduce the size of the contained button relative to text size - but I
can also see how someone could see it as "not consistent."


On 5/6/08, Bill Keese <bill at dojotoolkit.org> wrote:
> Hi,
>> as we discussed in the dijit meeting we decided to use em's instead  
>> of
>> pixels for all text-sizing related issus.
>> This is a good approach but brings a few draw-backs we need to  
>> address.
> I'm certainly open to discussion although I don't really understand  
> what
> issue you are getting at.   When you say:
>> Currently the only solution to keeping a consistent L&F ...
> it sounds like a philosophical question about what "consistent" means.
> I'm thinking that as the end-user increases the font size, the widgets
> increase in size also, so that the size of the widgets is "consistent"
> with the size of the text on the page.
>> .dijitFontNode {
>> font-size: 13px;
>> }
> Sounds like that would defeat the whole purpose of using em's, for
> people that need to make the font bigger b/c they have poor vision
> (they would be able to read the content on the page but not the tab
> labels themselves)
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-contributors

More information about the dojo-contributors mailing list