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

Re: style sheets with ancient browsers

From: Joel N. Weber II <nemo@koa.iolani.honolulu.hi.us>
Date: Sat, 11 Jan 1997 16:30:20 -1000 (HST)
To: Hakon Lie <howcome@www10.w3.org>
cc: www-style@www10.w3.org
Message-ID: <Pine.SOL.3.91.970111162226.22577N-100000@koa.iolani.honolulu.hi.us>
On Sun, 12 Jan 1997, Hakon Lie wrote:

> Joel N. Weber, II writes:
> 
>  > The following example appears in section 1.1 of the CSS1 draft I'm 
>  > looking at (a month or two old, but probably not changed from the current 
>  > approved version)
> 
> You should get the latest draft -- which isn't a draft any longer but
> a W3C Recommendation [1]. It states (more clearly than in the draft
> you are using) that the section you refer to is informative, not
> normative.

That text did appear in the draft I was using.

>  >   <HEAD>
>  >     <TITLE>title</TITLE>
>  >     <LINK REL=STYLESHEET TYPE="text/css"
>  >       HREF="http://style.com/cool" TITLE="Cool">
>  >     <STYLE TYPE="text/css">
>  >       @import url(http://style.com/basic);
>  >       H1 { color: blue }
>  >     </STYLE>
>  >   </HEAD>
>  > 
>  > The documentation goes on to state that the style sheet specified with 
>  > <STYLE> will always be used, while the one specified by <LINK> is an 
>  > optional alternative.
> 
> Right. Since WD-style [2] is still a working draft, there is still
> some time to discuss this. Many people think LINKed style sheets
> should be applied automatically just like style sheets inside the
> STYLE element. Therefore, a new value on LINK's REL attribute has been
> suggested:
> 
>   <LINK REL=ALT-STYLESHEET HREF="..">
> 
> This style sheet will not be applied automatically, but one with
> REL=STYLESHEET will. The proposal seems equivalent to your proposal:
> 
>  > <LINK PRIORITY=alt .....>
>  > <LINK PRIORITY=normal ...>
> 
> .. except we don't have to add a new attribute on LINK.

Your proposal looks fine to me.  I'm quite happy to drop my proposal.

>  > The problem is that primitive browsers (like old versions of Lynx) will 
>  > display the stuff inside <STYLE>.  That seems wrong to me.  If the <LINK> 
>  > and <STYLE> are equal, and I'm authoring a page, I'd use <LINK>.
> 
> 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.

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

Still, it bothers me that the comments are comments in some places and 
have to be ignored in others.  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.

> But I would agree with you that LINK is preferable.

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}">?  Or is that not worthwhile?
(Actually, you can do that in <BODY style="H1 {color: blue}">, but we 
want to get away from putting everything on the <BODY> tag)


nemo
                                                 http://www.cyclic.com/~nemo
<nemo@koa.iolani.honolulu.hi.us>                    <devnull@gnu.ai.mit.edu>
----------------------------------------------------------------------------
"...For I have not come to call the righteous, but sinners."  -- Mathew 9:13
Received on Saturday, 11 January 1997 21:33:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:46 GMT