[dokuwiki] Re: styles, line-heights and ems

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 20 Mar 2006 18:33:18 +0000

Anika Henke wrote:

Hi!

Chris Smith wrote:
I notice dokuwiki has some line-height property values in ems.
Should we remove the em or make them percents (which amounts to the same thing)?
As you proved yourself by the sentence stated below, it does *not* completely amount to the same thing ... ;-)
You misunderstand me.

line-height: 1.5   is equivalient to line-height: 150%.

neither is fuctionally equivalent to line-height: 1.5em
although the values will be equivalent until there is a font-size change in a child/descendent.


As I understand it, if there is a font-size change in a nested element, an inherited line-height using em units will not change - ie, it won't be recalculated for the new font-size. A line-height value using a unitless number or a percent will be inherited as a ratio and the actual line-height will be recalculated.


Hmm. I could not rebuild that behaviour (if I understood you correctly).

If you ask what unit should be taken in general or what advantages and disadvantages they have: I for one am nearly always using em. But that is most probably only because I am used to it. And that's also the reason for me not knowing much about percent.
Using em is sensible for most things. For font-size I prefer % for esoteric reasons (although they are functionally equivalent here). And for line-height em is more restrictive than a ratio (plain number or %).
Personally, I don't care for one way or the other in DokuWiki. But it should be *consistent*. If you liked to make the DokuWiki styles reasonably so, I am not in your way. :-)
I will submit a patch to Andi, (and if I remember I'll prepare a sample page to highlight the differences between em and plain ratio.


Chris

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: