W3C home > Mailing lists > Public > www-html-editor@w3.org > April to June 2003

(unknown charset) Re: Updated XHTML 2.0 draft published - 'style' attr

From: (unknown charset) Tantek Çelik <tantek@cs.stanford.edu>
Date: Wed, 07 May 2003 17:04:17 -0700
To: (unknown charset) Toby A Inkster <tobyink@goddamn.co.uk>, Masayasu Ishikawa <mimasa@w3.org>
CC: (unknown charset) <www-html@w3.org>, <www-html-editor@w3.org>
Message-ID: <BADEECB1.27773%tantek@cs.stanford.edu>

On 5/7/03 1:56 PM, "Toby A Inkster" <tobyink@goddamn.co.uk> wrote:

> 6.9
> 
> The troubled style attribute. If we're going to keep it, can't we at
> least make it a little more useful. For example, say I want to use an
> inline style to set the background color of each paragraph to yellow:
> 
> <section>
> <p> .. </p>
> <p> .. </p>
> <p> .. </p>
> </section>
> 
> It would be nice to do it just once using:
> 
> <section style="
> p {
> background-color: #FFC;
> }
> ">
>       <p> .. </p>
>       <p> .. </p>
>       <p> .. </p>
> </section>
> 
> rather than:
> 
> <section>
>       <p style="background-color: #FFC;"> .. </p>
> <p style="background-color: #FFC;"> .. </p>
> <p style="background-color: #FFC;"> .. </p>
> </section>

Completely agreed!  And in fact, the syntax/effect of the contents of the
style attribute have been completely delegated to CSS (just as the
syntax/effect of the contents of the <style type="text/css"> element have
been completely delegated to CSS), and thus are defined in a different
specification, which contains the very feature you requested:

 http://www.w3.org/TR/css-style-attr

Which reminds me, yet another draft I need to help update/move along.

> Also, must this data be of type "text/css"?

That is my opinion and many others, and seems to be what the group is
tending towards, the thinking being, in practice, text/css is the *only*
type that is currently defined for the 'style' attribute, text/css is the
*only* type that has been used in practice for the 'style' attribute, and if
any such theoretical alternative types show up and want such functionality,
they should define their own 'style' attribute in their own namespace, e.g.
the newfangled Foo Style Sheet Language could define the foossl:style
attribute.

Thanks for the feedback,

Tantek
Received on Wednesday, 7 May 2003 20:03:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:17:44 GMT