W3C home > Mailing lists > Public > www-style@w3.org > June 2002

Re: X11 Colors (was Last call comments on CSS3 module: color)

From: Chris Lilley <chris@w3.org>
Date: Mon, 3 Jun 2002 13:36:09 +0200
Message-ID: <17649720859.20020603133609@w3.org>
To: www-style@w3.org, www-style-request@w3.org, Andy <lordpixel@mac.com>

On Monday, June 3, 2002, 6:53:44 AM, Andy wrote:


A> Chris Lilley wrote:

>> It remains to be shown, though, that any color naming syntax has any
>> benefit over entity references which can be used to assign any desired
>> color to any desired keyword, under user control, in any language,
>> with 100% interoperability and no changes to the specification.

A> You mean SGML/XML entity references?

Yes. Well, XML ones - there is only one SGML+CSS implementation that I
am aware of.

A> ie, something like:

A> &AndysFunkyBlue;

A> along with an appropriate definition?

Yes.

A> I didn't think those would work in .css files. I'd be happy to hear that
A> I'm wrong!

It will only work in internal files, that is correct, unless CSS gets an XML syntax.


A> Can you provide a working example?

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/SVG/DTD/svg10.dtd" [
<!ENTITY AndysFunkyBlue '#2356CF'>
]>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"
viewBox="0 0 400 300">
  <desc>
    Demonstration of entity references for arbitrary named colors
  </desc>
  <style type="text/css">
  circle { fill: #393; stroke: #C66; stroke-width: 8}
  #Andy > circle  { fill: &AndysFunkyBlue; }
  </style>
  <circle r="200" cx="200" cy="150"/>
  <g id="Andy">
    <circle r="100" cx="200" cy="150">
    <desc>I am whatever color the entity tells me to be</desc>
    </circle>
  </g>
</svg>


-- 
 Chris                            mailto:chris@w3.org
Received on Monday, 3 June 2002 07:37:13 GMT

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