Re: Why is the style tag restricted to the head?

On Wednesday 2002-08-14 21:41 -0400, Jesse McCarthy wrote:
> I don't claim to know anything technical about how to implement these
> technologies in a browser -- would it be feasible from the
> implementation perspective to allow STYLE outside of HEAD on the basis
> that the rules in a given STYLE element could only affect elements
> which followed them in document order?

Such a thing would be possible, although there would be a number of
difficult issues that I would expect implementations to mess up on, such
as handling of dynamic changes to the part of the document "before" the
stylesheet.

Mozilla currently processes stylesheets that are outside of the HEAD
(after all, with much HTML on the web today, it's hard to really tell
where the HEAD was meant to end), but it applies them to the entire
document, not just the part of the document after the LINK or STYLE
element.  CSS already has adequate mechanisms for applying stylesheets
to parts of documents, so I don't see why another one (and one that's
somewhat difficult to implement) is needed.  Such a mechanism also
disagrees rather strongly with the principles of separation of content
and presentation.

-David

-- 
L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >

Received on Monday, 19 August 2002 15:31:21 UTC