Michael Hulse wrote:
> Hello,
> 
> I have always specified a unit when coding my CSS (except units of 
> 0). I am wondering what, when, why, and where I would be specifying a
>  raw # for units?

> ...is specifying a unit for line-height a bad thing, sloppy, or just 
> a matter of individual coding preference.

I use unit quite often, but I also use "flat" font-sizing.

A percent-unit will result in a line-height based on inherited value,
which can be a bit hard to predict if complex font-sizing is applied.
Unitless will result in an exact and predictable line-height based on
the element's own font-size.

So, if you trim a lot with changing relative font-sizes and nest them
heavily, then the unitless line-height will give you the correct value
every time. If you use "flat" font-size with no inherited changes, then
it doesn't really matter.

If in doubt or in trouble: use unitless line-heights.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to