Re: Unscoped <style> found outside the <head>

Hi Preston,

On May 26, 2007, at 3:48 PM, Preston L. Bannister wrote:

> Perhaps not a great practice, but there is a certain amount of  
> sense in this usage.  If a page is dynamically assembled from  
> multiple somewhat-independent sources, then the need for dropping  
> in new <style> at the point the fragment is inserted into the page  
> is understandable.  Not great for the browser implementors, but if  
> in practice class names are chosen so that the <style> only apply  
> to the included fragment, then effect should be limited in scope.

I think scoped style handles your and Daniel's use case better; each  
individually assembled chunk can carry its own styles.

  - Maciej


>
> On the other hand, there are all the interesting test cases on  
> MySpace.
>
>
> On 5/26/07, David Hyatt < hyatt@apple.com> wrote:
>
> An unscoped <style> applies to the entire document.  There's no point
> in placing a <style> element in some random place in the <body>,
> since the style rules added will apply to the whole document.  This
> is very bad practice, since an incremental display of a document will
> have to rewind and re-evaluate style on everything seen so far.  If
> the elements are in the <head>, then this re-evaluation doesn't have
> to occur.
>
> Some browsers (and I'm not endorsing this, but just pointing it out
> because this is the end effect achieved anyway) actually move <style>
> elements encountered in the <body> into the <head> during parsing.
>
> <style> outside the <head> is invalid HTML4 as well.
>
> dave
>
> On May 26, 2007, at 3:12 AM, Daniel Glazman wrote:
>
> > Dan Connolly wrote:
> >> On Fri, 2007-05-25 at 14:26 -0700, David Hyatt wrote:
> >>> Please make this non-conforming.  I don't think we should
> >>> encourage  this bad practice.
> >> I wonder who you are directing this request to. You're an editor.
> >> If you want the spec to change, please change it and
> >> let us know.
> >
> > Sorry, this is bad for wysiwyg editors and I want to understand
> > the rationale behind it. I disagree with the change w/o further
> > explanations given here.
> >
> > </Daniel>
>
>
>

Received on Saturday, 26 May 2007 23:59:27 UTC