W3C home > Mailing lists > Public > www-style@w3.org > February 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 2 Feb 2012 02:23:24 -0800
Message-ID: <CAAWBYDBwO3WU6ujP-gpUUE=+u2OcRchNxsJ_tWPBFnO8OsTfEQ@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Brian Manthos <brianman@microsoft.com>, Sylvain Galineau <sylvaing@microsoft.com>, "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>, fantasai <fantasai@inkedblade.net>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT