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: Aryeh Gregor <ayg@aryeh.name>
Date: Thu, 2 Feb 2012 12:19:42 -0500
Message-ID: <CAKA+AxnpjsCkHfFd63Ea6A0D80Ccf7G9dgW_Tj6jeNGRs4ryWQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, 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 Thu, Feb 2, 2012 at 5:23 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 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).

ems are inherited in transforms:

data:text/html,<!doctype html>
<div style="font-size:0;transform:translate(5em)">
<div style="height:100px;width:100px;background:red;

The div is translated in IE10 Developer Preview, Firefox 13.0a1, and
Opera Next 12.00 alpha, although not in Chrome 18 dev.  (Make sure to
prefix 'transform' appropriately.)  Whether this makes any sense is
perhaps debatable, but it's what most browsers do, and also what the
spec said until quite recently -- Computed value: As specified

I guess this is a nitpick, though.
Received on Thursday, 2 February 2012 17:20:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:55 UTC