Re: Updated XHTML 2.0 draft published - 'style' attr

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 UTC