Re: [css3-2d-transforms][css3-images] <position> grammar is duplicated or points to the wrong spec

On Wed, Feb 1, 2012 at 10:53 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> Actually, come to think of it, even this would be useful for some layout work when lots of things in a chain of descendants are measured in ems, and it is hard to track what the current font-size would be in pixels, but you know you want a certain distance that changes with the font-size (for a text-shadow offset, perhaps):
>
> calc(3px, as em)

I don't understand how this would accomplish what you want.  Assume
that the font-size was originally 15px, so this resolves to .2em. Then
the element changes to font-size:30px.  This then resolves to .1em,
*not* to 6px like I think you want.  If you were counting on this to
work with inheritance, ems are never inherited - they get computed
into px (this is why line-height can be specified with a <number> as
well).

~TJ

Received on Thursday, 2 February 2012 10:24:11 UTC