ISSUE-40: Should the <length> <length> offset be optional in a shadow?

box-shadow grammar

Should the <length> <length> offset be optional in a shadow?

State:
CLOSED
Product:
CSS3 Backgrounds and Borders
Raised by:
Bert Bos
Opened on:
2008-05-07
Description:
See also thread at http://lists.w3.org/Archives/Public/www-style/2008May/0035.html

1) [Minor:] the grammar contains two errors: it requires at least two shadows instead of one; and it makes the comma optional. The best fix depends on the answer to the next question.

2) The offset (<length> <length>) is optional and defaults to '0 0', which means that an omitted offset makes the shadow invisible and is thus almost never useful. There are at least two solutions: require an offset or make the default more useful.

The similar 'text-shadow' property (http://www.w3.org/TR/2007/WD-css3-text-20070306/#text-shadow) makes the offset required. Whatever solution is chosen, 'box-shadow' and 'text-shadow' should probably have the same syntax.

* Solution 1, don't omit the offset:

none | <shadow> [ , <shadow> ]*

where <shadow> is

<length> <length> <length>? <color>? |
<color> <length> <length> <length>?

* Solution 2, better default offset:

An omitted offset could default to '1px 1px' or to a value chosen by the UA.
Related Actions Items:
No related actions
Related emails:
  1. [CSSWG] Minutes Seattle F2F 2017-01-12 Part I: FX Breakout - Transforms [css-transforms] (from daelcss@gmail.com on 2017-02-13)
  2. [CSSWG] Minutes Telecon 2016-04-20 [css-flexbox] [css-grid] (from daelcss@gmail.com on 2016-04-20)
  3. [csswg] Agenda conf call 20-Apr-2016 (from stearns@adobe.com on 2016-04-20)
  4. Call for agenda items (from stearns@adobe.com on 2016-04-19)
  5. [csswg] Agenda conf call 13-Apr-2016 (from Rossen.Atanassov@microsoft.com on 2016-04-13)
  6. Re: Call for agenda items (from kojiishi@gmail.com on 2016-04-12)
  7. Call for agenda items (from Rossen.Atanassov@microsoft.com on 2016-04-12)
  8. Agenda+ Grid and Flexbox Issues (from fantasai@inkedblade.net on 2016-04-11)
  9. [Publish] [css-position] Publish CSS Positioned Layout Working Draft (from Rossen.Atanassov@microsoft.com on 2015-01-12)
  10. [css3-background] Issues and Proposed Resolutions (from fantasai.lists@inkedblade.net on 2008-05-13)
  11. ISSUE-40 (box-shadow grammar): Should the <length> <length> offset be optional in a shadow? [CSS3 Backgrounds and Borders] (from sysbot+tracker@w3.org on 2008-05-07)

Related notes:

non-zero default offsets rejected: nobody likes this idea and it's inconsistent with text-shadow

Elika Etemad, 12 May 2008, 21:12:50

making optional offsets rejected, issue open for grammar errors fix

Elika Etemad, 12 May 2008, 21:19:57

Display change log ATOM feed


Alan Stearns <stearns@adobe.com>, Rossen Atanassov <ratan@microsoft.com>, Chairs, Chris Lilley <chris@w3.org>, Fuqiao Xue <xfq@w3.org>, Staff Contacts
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 40.html,v 1.1 2020/01/17 10:41:09 carcone Exp $