style sheets with ancient browsers

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.

 >   <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.

 > 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>

But I would agree with you that LINK is preferable.

[1] http://www.w3.org/pub/WWW/TR/REC-CSS1
[2] http://www.w3.org/pub/WWW/TR/WD-style

Regards,

-h&kon

H   å   k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria §°þ#¡ª FRANCE http://www.w3.org/people/howcome

Received on Saturday, 11 January 1997 20:01:55 UTC