W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Re: [css3-background] error in box-shadow examples?

From: Håkon Wium Lie <howcome@opera.com>
Date: Mon, 26 Jan 2009 18:06:36 +0100
Message-ID: <18813.60828.913251.27470@opera.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: www-style@w3.org

Also sprach Brad Kemper:

 > >  box-shadow:
 > >    rgba(0,0,0,0.4)
 > >    10px 10px
 > >    10px /* spread */
 > >
 > >  box-shadow:
 > >    rgba(0,0,0,0.4)
 > >    10px 10px
 > >    10px /* spread */
 > >    inset

 > Huh. That is odd. They seems to be missing a zero for blur radius.

Yes. 

 > Is that because the definition of <shadow> seems to allow the third
 > length to represent either blur or spread when only three lengths
 > are present?

I don't think so. The spec [1] says:

  The third length is a blur radius.

  The fourth length is a spread radius.

[1] http://dev.w3.org/csswg/css3-background/#box-shadow

So, if you want to specify a spread, you have to specify the blur as
well. Therefore, I think the examples should be:

  box-shadow:
    rgba(0,0,0,0.4)
    10px 10px 0px
    10px /* spread */

  box-shadow:
    rgba(0,0,0,0.4)
    10px 10px 0px
    10px /* spread */
    inset

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Monday, 26 January 2009 17:07:09 GMT

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