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

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

From: Andy <lordpixel@mac.com>
Date: Mon, 03 Jun 2002 22:57:36 -0400
Message-ID: <3CFC2CA0.D0900F9E@mac.com>
To: Chris Lilley <chris@w3.org>
CC: www-style@w3.org, www-style-request@w3.org

Chris Lilley wrote:
> 
> 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>

While that's certainly useful within XML or (X)HTML files, it means if
you have any .css files in your site, you can't define site wide colors
and access them in said .css files. Which kinds limits its usefulness;
if you're in need of a site wide color set, you probably also have
sitewide CSS in .css files.

Shame - but I figured if it was that easy someone would have proposed it
as a solution by now.

Is there a particular resistance to adding an entity like mechanism to
css? - it could be used for all sorts of things (symbolic font names
like HeadlineFont, for example). I imagine there are performance and DOM
(computed value?) considerations I'm not aware of.

-- 
AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

I think we finally found the killer app for Flash: animated stick men
Received on Monday, 3 June 2002 22:58:31 GMT

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