2222
2323 < h1 > CSS Backgrounds and Borders Module Level 3</ h1 >
2424
25- < h2 class ="no-num no-toc " id =longstatus-date > W3C Working Draft 10 June
25+ < h2 class ="no-num no-toc " id =longstatus-date > W3C Working Draft 12 June
2626 2010</ h2 >
2727
2828 < dl >
2929 < dt > This version:
3030
3131 < dd > < a
32- href ="http://www.w3.org/TR/2010/WD-css3-background-20100610 "> http://www.w3.org/TR/2010/WD-css3-background-20100610 </ a >
32+ href ="http://www.w3.org/TR/2010/WD-css3-background-20100612 "> http://www.w3.org/TR/2010/WD-css3-background-20100612 </ a >
3333 <!--<a href="http://dev.w3.org/csswg/css3-background">http://dev.w3.org/csswg/css3-background</a>-->
3434
3535
@@ -3724,11 +3724,11 @@ <h3 id=the-box-shadow><span class=secno>6.2. </span>The ‘<a
37243724 the blur radius is zero, the shadow's edge is sharp. Otherwise, the
37253725 larger the value, the more the shadow's edge is blurred. See below.
37263726
3727- < li > The fourth length is a spread. Positive values cause the shadow shape
3728- to expand in all directions by the specified radius. Negative values
3729- cause the shadow shape to contract. See below. < span class = note > Note that
3730- for inner shadows, expanding the shadow (creating more shadow area) means
3731- contracting the shadow's perimeter shape.</ span >
3727+ < li > The fourth length is a spread radius . Positive values cause the shadow
3728+ shape to expand in all directions by the specified radius. Negative
3729+ values cause the shadow shape to contract. See below. < span
3730+ class = note > Note that for inner shadows, expanding the shadow (creating
3731+ more shadow area) means contracting the shadow's perimeter shape.</ span >
37323732
37333733 < li > The color is the color of the shadow.
37343734
@@ -3740,12 +3740,12 @@ <h3 id=the-box-shadow><span class=secno>6.2. </span>The ‘<a
37403740 </ ul >
37413741
37423742 < p > An outer box-shadow casts a shadow as if the border-box of the element
3743- were opaque. The shadow is drawn outside the border edge only: it is not
3744- drawn inside the border-box of the element.
3743+ were opaque. The shadow is drawn outside the border edge only: it is
3744+ clipped inside the border-box of the element.
37453745
37463746 < p > An inner box-shadow casts a shadow as if everything outside the padding
37473747 edge were opaque. The inner shadow is drawn inside the padding edge only:
3748- it is not drawn outside the padding box of the element.
3748+ it is clipped outside the padding box of the element.
37493749
37503750 < p > If the box has a nonzero < span class =property > ‘< a
37513751 href ="#border-radius "> < code
@@ -3754,24 +3754,32 @@ <h3 id=the-box-shadow><span class=secno>6.2. </span>The ‘<a
37543754 class =property > border-image</ code > </ a > ’ does not affect the shape of
37553755 the box-shadow.
37563756
3757- < p > If a spread is defined, the shadow is expanded by an outward outset of
3758- the specified amount normal to the original shadow perimeter. For corners
3759- with a zero border-radius (i.e. where the normal is not defined), the
3760- corner remains sharp—the operation is equivalent to scaling the
3761- shadow shape. The UA may approximate the transformed shadow perimeter
3762- shape by outsetting (insetting, for inner shadows) the shadow's straight
3763- edges by the spread distance and increasing (decreasing, for inner
3764- shadows) and flooring at zero the corner radii by the same amount. In
3765- either case, the effective width and height of the shadow shape is floored
3766- at zero. (A zero-sized shadow shape would cause an outer shadow to
3767- disappear, and an inner shadow to cover the entire padding-box.)
3768-
3769- < p > The blur radius is perpendicular to and centered on the shadow's edge
3770- and defines a gradient color transition ranging from the full shadow color
3757+ < p > If a spread radius is defined, the shadow is expanded outward by an
3758+ operation equivalent to applying the absolute value of the spread radius
3759+ to a blur operation as defined below and thresholding the result such for
3760+ a positive spread radius all non-transparent pixels are given the full
3761+ shadow color and for a negative spread radius all non-opaque pixels are
3762+ made transparent. The UA may approximate this operation by taking an
3763+ outward outset of the specified amount normal to the original shadow
3764+ perimeter. Alternatively the UA may approximate the transformed shadow
3765+ perimeter shape by outsetting (insetting, for inner shadows) the shadow's
3766+ straight edges by the spread distance and increasing (decreasing, for
3767+ inner shadows) and flooring at zero the corner radii by the same amount.
3768+ (The UA may even combine these methods, using one method for outer shadows
3769+ and another for inner ones.) For corners with a zero border-radius,
3770+ however, the corner must remain sharp—the operation is equivalent to
3771+ scaling the shadow shape. In any case, the effective width and height of
3772+ the shadow shape is floored at zero. (A zero-sized shadow shape would
3773+ cause an outer shadow to disappear, and an inner shadow to cover the
3774+ entire padding-box.)
3775+
3776+ < p > A positive blur radius indicates that the resulting shadow should be
3777+ blurred, such as by a Gaussian filter. The exact algorithm is not defined;
3778+ however for a long, straight shadow edge, this should create a color
3779+ transition the length of the blur radius that is perpendicular to and
3780+ centered on the shadow's edge, and that ranges from the full shadow color
37713781 at the radius endpoint inside the shadow to fully transparent at the
3772- endpoint outside it. < span class =issue > Is this the correct definition for
3773- blur radius? Also, is there a better term for it?</ span > The exact
3774- algorithm for the blur transition is not specified.
3782+ endpoint outside it.
37753783
37763784 < div class =example >
37773785 < p > The example below demonstrates the effects of spread and blur on the
0 commit comments