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

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;
font-size:20px;transform:inherit">Translated</div></div>

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
(https://www.w3.org/Bugs/Public/show_bug.cgi?id=15797).

I guess this is a nitpick, though.

Received on Thursday, 2 February 2012 17:20:35 UTC