Font-size-adjust

From the telecon, which I unfortunately missed this week:

> jdaggett: Other issue that was brought up was relationship of
>            font-size-adjust and line height
>  jdaggett: Line height is typically specified relative to the font size
>  jdaggett: Vlad was concerned that there was nothing in the spec that
>            talked about relationship of font-size-adjust and line-height
>  <jdaggett> http://dev.w3.org/csswg/css-fonts/#font-size-adjust-auto-value
>  jdaggett: 'em' unit is not affected by font-size-adjust
>  [reads note]
>  jdaggett: Does that cover what you're worried about, Vlad?
>  Vlad: covers part of it
>  Vlad: But not clear to implementers what's affected
>  Vlad: Should be clear that line-height is always calculated wrt base
>        font-size, not affected by font-size-adjust
>  jdaggett: Think we're covered by css3-values
>  fantasai: Not entirely. line-height takes lengths, but also takes numbers
> 
>  dbaron: You noted in the note that authors set line-height in em units,
>          but that's really bad, should set in number units
> 
>  SteveZ: Question... specified, computed, used, which?
>  fantasai: We decided on computed font-size for 'em', so probably
>            line-height should be the same
>  SteveZ: So font-size-adjust affects used font-size, but not computed
>          font-size.
>  SteveZ: Would be useful to say that.
>  jdaggett: So we need to add a normative statement to paragraph above.
>  Vlad: Say that font-size-adjust affects the used font-size (used to
>        render text), not the computed font-size
>  Vlad: That also addresses my concerns about describing precisely how
>        this works.

I can see why line-height should not be affected (you wouldn't want a short span of adjusted to change the used height of the whole line box). But there are other things negatively affected by an em unit being different from the used font size. Suppose I have something like this:

sup {
   font-size: .3em;
   vertical-align: top;
}

Fist off, the font size would be based on the size of something other than the actual size of the font used, which is never what I'd want. And the vertical-align would not align to the top of the actual text, but might instead be higher or lower; it's unpredictable. And therefore bad. 

A similar problem would occur if you use vertical-align with an em length. If you do, you expect the baseline to move up or down an amount that is relative to the actual size of the font used. But it wouldn't, because the actual font size used does not change the ems.

I feel ems should be affected by font-size-adjust, with some special rules about line-height not being affected. 

Received on Thursday, 29 August 2013 19:33:09 UTC