shadows

Ka-Ping Yee writes:

 > If "shadow" is going to have possibly four or five parameters of
 > its own, maybe it should be its own property rather than a special
 > value of "text-decoration" which happens to take extra parameters.

This is a good idea. 

David Perrell writes:

 > A consistent measurement for shadow is needed. Gaussian blur is the
 > usual method for blurring shadows, and this is specified as the
 > diameter of the area over which the effect propagates, not a
 > percentage.

Right. Blur is cool, but maybe too resource-intensive? Implementors
resisted the background gradients that were in CSS1 earlier, and blur
falls into the same category. Best to leave it out for now, but
reserving the percentage units for its use? The same argument can be
made againt transparency? How about

______________

text-shadow

Applies to: all elements
Value: none | [<color>||<offset>||<transparency>][,<color>||<offset>||<transparency>]*
Initial: none
Inherited: no, but see clarification below
Percentage values: indicate transparency

This property describes shadowing effects on the text of an element:

 P { text-shadow: black }

The example above creates a black text shadow down and to the right of
the text. 

Multiple shadows can be specified in comma-sparated lists:

  text-shadow: red 0.1em 0.1em, blue -0.1em -0.1em 80%; 

The shadows are specified in top-to-bottom order. In the example
above, the red shadow would be on top of the blue shadow.

The position and transparency values are:

<offset> 
  Value: <length>{1,2}
  Initial: UA specific, but equivalent to a little down to the right;

  Offset values are relative to the text that is shadowed. If one
  length unit is specified, it describes both the x and y offsets. If
  two length units are specified, they describe x and y offsets
  respectively.

<transparency>
  Value: <percentage>
  Initial: 0%

  The transparency value describes the transparency of the shadow
  against the underlying surface (possibly another shadow).

This property is not inherited, but children elements should match
their parent.

If the text has other decorations (e.g. underlines), those should also
be shadowed. (Should borders be shadowed as well?)

The shadows do not take up any space. I.e., the sizes of the boxes
surrounding the element will not change due to shadows. 

There may be implementation-specific limitations on shadows.

_________________

If we want to add blur at a later point we can do so by adding another
length value. Then, we would not be able to specify a blur without
also specifying both x and y offsets, but that shouldn't be a major
problem.


 > There are other spots in CSS where the grouping levels are not
 > quite made clear -- for instance, to specify a border colour
 > the "color" keyword is missing (implied?), while the meaning
 > is really something on the order of "border-left-color: red", etc.
 > The extra grouping levels are dropped so that it looks like all
 > properties have two levels, even though they don't really.

I'm not sure I understand what you mean here. Some CSS properties
allow multiple values and could have been split up into several
properties. E.g. 'background' could have been split the current
'background' property into: bg-color, bg-url, bg-repeat, bg-scroll,
bg-hposition and bg-vposition. The reason for not doing it this way is
that grouping is necessary to ensure that values meant to go with,
e.g., one image ends up influencing another image. Do we need to
clarify this in the specification?

Regards,

-h&kon

Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/people/howcome  howcome@w3.org

Received on Friday, 9 August 1996 12:51:13 UTC