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

Re: Re[8]: css with attribues (was: Re[2]: [CSS] Would be nice if...)

From: Brad Kemper <brkemper@comcast.net>
Date: Tue, 15 Jan 2008 08:14:29 -0800
Message-Id: <ABB17462-0783-4396-B327-9E921ADA9B67@comcast.net>
Cc: CSS Style <www-style@w3.org>
To: David Dorward <david@dorward.me.uk>




On Jan 15, 2008, at 5:57 AM, David Dorward wrote:
>
> On 14 Jan 2008, at 08:38, Dmitry Turin wrote:
>>>> DD> It also needs to implement media types
>>>> Strongly disagreed !
>>>> Now we don't assign or not assign attributes depending media types.
>>
>
>> I propose, that attbitutes are considered as assigned by css
>> _for all media_. Clarify, how is this proposal make barrier
>> for debug.
>
> I misunderstood what you are trying to say, and, while that last  
> paragraph clearly shows that what I thought you meant was wrong,  
> I'm still not sure what you actually mean.

It sounds to me like what he is saying is that CSS properties (at  
least those appropriate for all media) should be assignable directly  
to to HTML tags as attributes, so that the following would be  
equivalent (assuming only one div in this example):

~~~~~~~~~~~~~~~~~~~~~~~~~~
<div float="left" width="20em">
~~~~~~~~~~~~~~~~~~~~~~~~~~
<style media="all" type="text/css">
	div { float:left; width:20em; }
</style>
~~~~~~~~~~~~~~~~~~~~~~~~~~

With that, the "style" attribute would be redundant. And if you  
wanted to select everything that was floated left (either via html  
attribute or all media style sheet) and turn it green, you could do  
something like this:

*[float=left] { color:green !important; }

> Do you mean that they should be treated just like any other  
> property? i.e. that an attribute can be assigned based on the media  
> type of the stylesheet? If so, then my original point stands, the  
> client would have to be able to handle HTML and CSS media type syntax.

HTML UAs skip attributes they don't understand. So a client that does  
not understand CSS would be no worse off, as long as this only  
applied to presentational attributes. It _would_ be a problem for non- 
presentational attributes that only existed in CSS style sheets that  
some clients don't read.
Received on Tuesday, 15 January 2008 16:14:44 GMT

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