W3C home > Mailing lists > Public > public-html@w3.org > May 2007

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

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Sun, 27 May 2007 11:52:17 +0200
Message-ID: <465954D1.3020103@disruptive-innovations.com>
To: David Hyatt <hyatt@apple.com>
Cc: "Preston L.Bannister" <preston@bannister.us>, Dan Connolly <connolly@w3.org>, "public-html@w3.org WG" <public-html@w3.org>

David Hyatt wrote:

>> 1. and you expect web authors are going to understand that ?
> This behavior is clearly what Web authors think happens now when they 
> misuse <style> in random spots in the middle of the document.  They just 
> think they've thrown some extra rules into the page that will apply to 
> following content.  They don't think that it will retroactively apply to 
> previous content in the page.

I saw this behaviour appear many, many years ago when people started
(a) using webmail (b) saving replies to HTML email. Both often generate
invalid markup with mulitple heads and bodies and often style elements
inside bodies. I also saw this behaviour increase when average people
became a little bit more advanced after they started publishing their
own web page. They started using text-based editors w/o dtd control.

People don't always put a style element to apply to elements after them,
they also often put the style element right after... Example

     <div id="foo">...</div>
     <style>#foo h1 { color : red }</style>

So, let me summarize.
If you make all styles in the body scoped, such pages will break.
If you make all styles in the body apply in pre-order traversal tree,
some pages will break and it's just totally ugly design that many people
will not understand.

Received on Sunday, 27 May 2007 09:53:27 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:21 UTC