W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: Actual size of an em-sized shadow

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 3 May 2011 14:52:40 -0700
Message-ID: <BANLkTikWftPCUOvDKSduBFQHbNPubM_5xQ@mail.gmail.com>
To: Kornel Lesiński <kornel@geekhood.net>
Cc: www-style@w3.org
2011/5/3 Kornel Lesiński <kornel@geekhood.net>:
> This case is not interoperable in current browsers:
> <div style="font-size: 1px; text-shadow: 0 1em 0 red;">
>    <span style="font-size:10px">How</span>
>    <span style="font-size:20px">much</span>
>    <span style="font-size:30px">is</span>
>    <span style="font-size:40px">one</span>
>    <span style="font-size:50px">em?</span>
> </div>
> and appears to be unspecified in current CSS Text WD: "same as defined for
> the ‘box-shadow’", but I did not find anything in description of box-shadow
> that would explain how to compute lengths in elements that inherit a shadow.
> Firefox, Safari and Chrome pick one length for all of text, but they seem to
> compute it differently.
> Opera, although in minority, seems to have most sensible interpretation: em
> in shadow is computed relative to font size in each element.

Unless otherwise specified, you inherit the computed value of your
parent <http://www.w3.org/TR/CSS21/cascade.html#inheritance>.  Ems are
resolved into pixels for computed values, so all of the children
should inherit the same value - "0 1px 0 red".

Received on Tuesday, 3 May 2011 21:53:24 UTC

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