W3C home > Mailing lists > Public > www-style@w3.org > January 1997

Re: style sheets with ancient browsers

From: Chris Lilley <Chris.Lilley@sophia.inria.fr>
Date: Mon, 13 Jan 1997 18:55:41 +0100 (MET)
Message-Id: <9701131855.ZM29837@grommit.inria.fr>
To: "Joel N. Weber II" <nemo@koa.iolani.honolulu.hi.us>, Hakon Lie <howcome@www10.w3.org>, www-style@www10.w3.org
On Jan 11,  4:30pm, Joel N. Weber II wrote:

> On Sun, 12 Jan 1997, Hakon Lie wrote:

> > The problem experienced with older browsers can be "fixed" with
> > enclosing the style sheet in an HTML comment:
> >
> >   <STYLE><!--
> >     ..
> >   --></STYLE>
> >
> Old versions of Lynx don't correctly parse comments, either.  They treat
> them as unrecognized tags.  So if you embed tags in the comments, lynx
> acts as if the comment ends at the end of the first commented out tag,
> and then you see --> on your screen.

True, but the fault is clearly with older versions of lynx. Later versions
fix that bug.

> However, since there are no tags inside <STYLE>, the comment would work.

Right. There can be no tags inside <STYLE>

> Still, it bothers me that the comments are comments in some places and
> have to be ignored in others.

HTML comments are always comments and are never ignored by an HTML parser.
A browser that knows about the style element will not see the comments
because it simply skips over the non-html portion, ie until it sees </style>

What is inside the <style> element is not HTML. Its a stylesheet, using
whatever language the attribute said it was:

<style type="text/css">

> It seems that we're kludging to get
> backwords compatibilty, with the net result that 20 years from now, the
> rules for comments are going to be ridiculously complex.

No-one changed the rules for comments. They already are complex, true,
but that is a 'feature' inherited from SGML. But CSS has not made them
more complex or altered them at all.

What it has done is allowed HTML comments *inside CSS* where they
are ignored by the CSS parser.

> Can we find a way to write style information in the tags themselves, so
> that <STYLE>H1 {color: blue}</STYLE> could be written as
> <SOMETHING style="H1 {color: blue}">?

Yes, it can be written in the tags, like this:

<H1 style="color: blue">stuff</h1>

> (Actually, you can do that in <BODY style="H1 {color: blue}">, but we
> want to get away from putting everything on the <BODY> tag)

No, you can't do that. The style attribute does not have a selector,
because the element with that atttribute acts as the selector.

I suggest you get the final, up-to date version of the CSS1 specification
because working from old drafts is dangerous for authors and highly
dangerous for implementors such as yourself.

Chris Lilley, W3C                          [ http://www.w3.org/ ]
Graphics and Fonts Guy            The World Wide Web Consortium
http://www.w3.org/people/chris/              INRIA,  Projet W3C
chris@w3.org                       2004 Rt des Lucioles / BP 93
+33 (0)4 93 65 79 87       06902 Sophia Antipolis Cedex, France
Received on Monday, 13 January 1997 12:56:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:42 UTC