- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Thu, 11 Nov 1999 14:16:19 +0000 (GMT)
- To: Chris Wilson <cwilso@microsoft.com>
- cc: www-html@w3.org, www-html-editor@w3.org, Dave Raggett <dsr@w3.org>, lehors@w3.org, ij@w3.org, "'L. David Baron'" <dbaron@fas.harvard.edu>
On Fri, 5 Nov 1999, Chris Wilson wrote: >>> In fact, the HTML 4.0 spec does not explicitly state that multiple >>> LINKed preferred stylesheets (that is, REL="stylesheet" and a >>> given TITLE) are not all to be applied on load. >> Section 14.3.1 of HTML4: >># User agents MUST NOT apply alternate style sheets with a different >># style name. >> -- http://www.w3.org/TR/REC-html40/present/styles.html#h-14.3.1: > Indeed; you've pointed out the major incompatibility between the > HTML 4.0 specification and the "HTML and Style Sheets" draft > (http://www.w3.org/TR/WD-style-970324) that was the only > specification for HTML and style sheets until December 1997. "It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress"." >>> Only by setting the RELationship to "alternate stylesheet" can you >>> keep the stylesheet from being automatically applied. A STYLE >>> element functions like a LINK with a REL of "stylesheet", not one of >>> "alternate stylesheet". Otherwise, how would you make a preferred >>> embedded stylesheet? >> >>Section 14.3.2 of HTML4: >># * Specify that the style sheet is persistent, preferred, or >># alternate: >># + To make a style sheet persistent, set the rel attribute to >># "stylesheet" and don't set the title attribute. >># + To make a style sheet preferred, set the rel attribute to >># "stylesheet" and name the style sheet with the title >># attribute. >># + To specify an alternate style sheet, set the rel attribute to >># "alternate stylesheet" and name the style sheet with the >># title attribute. > > Read what I said - how would you make a PREFERRED EMBEDDED (that > means a <STYLE> element) style sheet. Just give it a title. ("name the style sheet with the title attribute") The real question is how to make the style element an alternate stylesheet, and not a preferred one. The answer is, include it after any other link or style elements with titles (since it has no 'rel' attribute). > <STYLE> would be a default (persistent) sheet. > <STYLE TITLE="foo"> would, in this proposal, be an alternate, but > not preferred, therefore not automatically loaded. No, it would be preferred if it came before any other preferred stylesheets. Just like a <LINK> stylesheet with a TITLE attribute but no "alternate" in the REL attribute. >> If we indeed assume that the <style> element is like a <link> with >> a REL of "stylesheet", then from the above rules the behaviour I >> described is exactly what should happen! > That's true; however, that wouldn't be your original proposal, would > it? If, so, my apologies. I intended to propose behaviour whereby the 'title' attribute of STYLE elements is treated _identically_ to the 'title' attribute of LINK elements, and that all STYLE elements are assumed to be "rel=stylesheet". > You would not be specifying multiple alternate style sheets, you > would be specifying multiple preferred style sheets - and you'd have > no way of including a SINGLE alternate style sheet that was not > automatically loaded. A preferred stylesheet with a different name than a previously-specified preferred stylesheet should be treated as an alternate stylesheet per the HTML4 specification. I am not proposing any change to this part of the specs. -- Ian Hickson "So far, people have shown a reasonable amount of sense in evaluating souls (whether they are properly priced)." -- Nick Gibbins; Author of http://totl.net/Soul/, 1999-10-05
Received on Thursday, 11 November 1999 09:16:26 UTC