Re: About dropping the style attribute

On Jun 24, 2007, at 2:56 AM, Anne van Kesteren wrote:

>
> On Sun, 24 Jun 2007 11:15:01 +0200, Håkon Wium Lie  
> <howcome@opera.com> wrote:
>> Also sprach Craig Francis:
>> The style element, when scoped to its parent, will be able to do this
>> -- and more -- but it is more verbose.
>
> The problem with the style= attribute, as opposed to the <style>  
> element. Is that it encourages media specific style sheets. As the  
> media for the style= attribute is automatically "all". It also does  
> not allow for alternate style sheets. The <style> element in HTML5  
> handles both. Having said that, I don't really care strongly either  
> way.

Sure, but most <style> elements or <link rel="stylesheet"> links in  
documents currently are not scoped to particular media and do not  
make use of @media rules. As far as I can tell, the most common use  
of @media is to use media queries to inject Opera-specific CSS rules.  
(Hopefully this will stop now that Safari 3 also supports media  
queries).

As far as I can tell there is little reason to believe that allowing  
scoped <style> but disallowing style="" will lead to more use of per- 
media style rules. I would like to see some evidence for this claim.

The existence of scoped style will let you do the right thing if you  
choose to, but the style attribute is still a handy shortcut.

Regards,
Maciej

Received on Sunday, 24 June 2007 23:10:18 UTC