W3C home > Mailing lists > Public > www-style@w3.org > April 1996

URLs in CSS

From: Hakon Lie <howcome@w3.org>
Date: Thu, 11 Apr 1996 11:38:40 +0200
Message-Id: <199604110938.LAA01225@www4.inria.fr>
To: www-style@w3.org
Several CSS properties take URL values. Up to now, URLs have been
identified with quotes. This works quite well for absolute links:

  BODY { background: "http://foo.com/png/marble" }

However, relative links can be confusing:

  BODY { background: "red" }  /* relative URL */
  BODY { background: red }    /* color name */

Here are some suggestions for alternative schemes;

  BODY { background: [http://foo/bar] }
  BODY { background: url:http://foo/bar }
  BODY { background: href:red }
  BODY { background: url:red }
  BODY { background: url(red) }
  BODY { background: url(http://foo/bar) }

Also, should the identification be optional for absolute URLs?:

  BODY { background: http://foo/bar } 

The syntax would still be nonambigous (assuming no color names with
colon in them), but error recovery could be harder.

Comments welcome.

-h&kon

Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/people/howcome  howcome@w3.org
Received on Thursday, 11 April 1996 05:38:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:44 GMT