W3C home > Mailing lists > Public > www-style@w3.org > January 2008

RE: Re[4]: css with attribues [software]

From: Alan Gresley <alan1@azzurum.com>
Date: Thu, 17 Jan 2008 08:47:26 -0700
To: Dmitry Turin <sql4-en@narod.ru>
cc: www-style@w3.org
Message-ID: <20080117084726.34b83c2f3c9bef00757a2c62c0fb7450.f4e287d2df.wbe@email.secureserver.net>

Dmitry Turin wrote:

> Alan,
> 
> >> We speak about admissibility of merging attributes and properties
> >> into single space, and possibility to specify them both in tags
> >> (without 'style=') and in CSS-file.
> AG>   you want to allow this.
> AG> <div float="left">
> AG> <name color="red">Name</name>
> AG> <surname color="blue">Name</surname>
> AG> <name color="green">Name</name>
> AG> <surname color="orange">Name</surname>
> AG> </div>
> AG>   with this CSS
> AG> div[float="left"] {float:none}
> AG> name[color="red"] {color:pink}
> AG> surname[color="blue"] {color:aqua}
> AG> name[color="green"] {color:lime}
> AG> surname[color="orange"] {color:yellow}
> 
> And for arbitrary tags also.
> But our battle :) is about appling for old, standard tags.


Actually not my battle, this is your battle, good luck.

What you are proposing to the CSS WG is if properties (float, color, width) [1][2] can be used as the attribute in Attribute Selectors [3].

1. http://www.w3.org/TR/CSS21/conform.html#property
2. http://www.w3.org/TR/CSS21/propidx.html
3. http://www.w3.org/TR/CSS21/selector.html#attribute-selectors

To very very clear to you Dmitry, taking this code.

HTML:
<surname color="orange">Name</surname>

CSS:
surname[color="orange"] {color:yellow}

the only part concerning the CSS WG is this.

CSS:
surname[color="...."]

Can a CSS property be used as the attribute in Attribute Selectors? My answer is yes. I will allow this since no one can stop you from doing it. And the really great part about it is that it can be done already.

http://css-class.com/test/css/selectors/property-attribute.htm

Please find the CSS embedded in the source. It's fully valid XHTML 1.0 Transitional and valid CSS. The down size is that the only UA that it does work in is IE. IE7 is a mystery, even though it supports attribute selectors, this test case proves that attribute selectors are not properly supported. Does this mean that any new attribute added to html and CSS will fail to work in IE7?

Now Dmitry your quest for the adoption of your proposal should depart this list and maybe migrate to the html WG list. The question for them is if CSS properties can be use as html atrributes [4].

4. http://www.w3.org/TR/html401/index/attributes.html


Alan

http://css-class.com/
Received on Thursday, 17 January 2008 15:47:40 GMT

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