diff --git a/css-backgrounds-4/Overview.bs b/css-backgrounds-4/Overview.bs index 3ac58c93d78..4e0221110bc 100644 --- a/css-backgrounds-4/Overview.bs +++ b/css-backgrounds-4/Overview.bs @@ -690,6 +690,184 @@ The 'border-clip' properties

The fragments are shown in red for illustrative purposes; they should be black in compliant UAs. +

Drop Shadows

+ +

Coloring shadows: the 'box-shadow-color' property

+ +
+Name: box-shadow-color
+Value: <>#
+Initial: currentcolor
+Applies to: all elements
+Inherited: no
+Percentages: N/A
+Computed value: list, each item a computed color
+Animatable: by computed value
+
+ +

The 'box-shadow-color' property defines one or more drop shadow colors. +The property accepts a comma-separated list of shadow colors. + +

See the section [[css-backgrounds-3#shadow-layers|“Layering, Layout, and +Other Details”]] for how 'box-shadow-color' interacts with other +comma-separated drop shadow properties to form each drop shadow +layer. + +

Offsetting shadows: the 'box-shadow-offset' property

+ +
+Name: box-shadow-offset
+Value: none | <>{2}#
+Initial: none
+Applies to: all elements
+Inherited: no
+Percentages: N/A
+Computed value: either 'none' or a list,
+	each item a pair of offsets (horizontal and vertical) from the element‘s box
+Animatable: by computed value
+
+ +

The 'box-shadow-offset' property defines one or more drop shadow offsets. +The property accepts a comma-separated list of horizontal and vertical offset pairs, +where both values are described as <> values. + +

+
1st <> +
+ Specifies the horizontal offset of the shadow. + A positive value draws a shadow that is offset to the right of the box, + a negative length to the left. + +
2nd <> +
+ Specifies the vertical offset of the shadow. + A positive value offsets the shadow down, a negative one up. +
+ +

See the section [[css-backgrounds-3#shadow-layers|“Layering, Layout, and +Other Details”]] for how 'box-shadow-offset' interacts with other +comma-separated drop shadow properties to form each drop shadow +layer. + +

Blurring shadows: the 'box-shadow-blur' property

+ +
+Name: box-shadow-blur
+Value: <>#
+Initial: 0
+Applies to: all elements
+Inherited: no
+Percentages: N/A
+Computed value: list, each item a <>
+Animatable: by computed value
+
+ +

The 'box-shadow-blur' property defines one or more blur radii for drop shadows. +The property accepts a comma-separated list of <> values. + +

Negative values are invalid. +If the blur value is zero, the shadow’s edge is sharp. +Otherwise, the larger the value, the more the shadow’s edge is blurred. +See [[css-backgrounds-3#shadow-blur|Shadow Blurring]], below. + +

See the section [[css-backgrounds-3#shadow-layers|“Layering, Layout, and +Other Details”]] for how 'box-shadow-blur' interacts with other +comma-separated drop shadow properties to form each drop shadow +layer. + +

Spreading shadows: the 'box-shadow-spread' property

+ +
+Name: box-shadow-spread
+Value: <>#
+Initial: 0
+Applies to: all elements
+Inherited: no
+Percentages: N/A
+Computed value: list, each item a <>
+Animatable: by computed value
+
+ +

The 'box-shadow-spread' property defines one or more spread distances for drop shadows. +The property accepts a comma-separated list of <> values. + +

Positive values cause the shadow to expand in all directions by the specified radius. +Negative values cause the shadow to contract. +See [[css-backgrounds-3#shadow-shape|Shadow Shape]], below. +

Note that for inner shadows, +expanding the shadow (creating more shadow area) +means contracting the shadow’s perimeter shape. + +

See the section [[css-backgrounds-3#shadow-layers|“Layering, Layout, and +Other Details”]] for how 'box-shadow-spread' interacts with other +comma-separated drop shadow properties to form each drop shadow +layer. + +

Spreading shadows: the 'box-shadow-position' property

+ +
+Name: box-shadow-position
+Value: [ outset | inset ]#
+Initial: outset
+Applies to: all elements
+Inherited: no
+Percentages: N/A
+Computed value: list, each item one of the keywords
+Animatable: by computed value
+
+ +

The 'box-shadow-position' property defines one or more drop shadow positions. +The property accepts a comma-separated list of 'outset' and 'inset' keywords. + +

+
outset +
+ Causes the drop shadow to be an outer box-shadow. + That means, one that shadows the box onto the canvas, as if it were lifted above the canvas. + +
inset +
+ Causes the drop shadow to be an inner box-shadow. + That means, one that shadows the canvas onto the box, as if the box were cut out + of the canvas and shifted behind it. +
+ +

See the section [[css-backgrounds-3#shadow-layers|“Layering, Layout, and +Other Details”]] for how 'box-shadow-position' interacts with other +comma-separated drop shadow properties to form each drop shadow +layer. + +

Drop Shadows Shorthand: the 'box-shadow' property

+ +
+Name: box-shadow
+Value: <>#
+Initial: none
+Applies to: all elements
+Inherited: no
+Percentages: N/A
+Computed value: either the keyword ''box-shadow-offset/none'' or
+    a list, each item consisting of four absolute lengths
+    plus a computed color and optionally also a ''box-shadow-position/inset'' keyword
+Animatable: by computed value,
+    treating ''box-shadow-offset/none'' as a zero-item list
+    and appending blank shadows (''transparent 0 0 0 0'')
+    with a corresponding ''box-shadow-position/inset'' keyword as needed
+    to match the longer list
+    if the shorter list is otherwise compatible with the longer one
+
+ +

The 'box-shadow' property attaches one or more drop-shadows to the box. + The property accepts either the ''box-shadow-offset/none'' value, which indicates no shadows, + or a comma-separated list of shadows, ordered front to back. + +

Each shadow is given as a <>, + outlining the 'box-shadow-offset', and optional values for the 'box-shadow-blur', + 'box-shadow-spread', 'box-shadow-color', and 'box-shadow-position'. + Omitted lengths are 0; omitted colors default to the ''currentcolor'' value. +

+  <> = <<'box-shadow-color'>>? && [ <<'box-shadow-offset'>> [ <<'box-shadow-blur'>> <<'box-shadow-spread'>>? ]? ] && <<'box-shadow-position'>>?
+

Changes