Re: LINK'ed style sheets -Reply

These are very interesting issues. Here are some comments.

1. About cascading of linked style sheets.

Scott Preece wrote:
How about this rule: use the TITLE attribute of the LINK element to name
individual stylesheets or groups of stylesheets - all the stylesheets
with the same name would be treated as a group, to be combined in order
(presumably the semantics of combining two stylesheets would depend on
the type of the stylesheets).

Distinguish one TITLE value (say, "", the null title) as meaning that the
so-titled stylesheet or stylesheets are to be applied automatically. 

We considered this when we wrote WD-style, but thought it was not a good idea to assign semantics to TITLE. TITLE was only meant for the human reader. The mechanism isn't really needed either, since another way to cascade two (CSS) styles is to create a small file, say `old-plus-overlay.style', containing just

	@import "old.style";
	@import "old-overlay.style";

The two LINKs will then be replaced by the single 
<LINK href="old-plus-overlay.style" ...>
(Admittedly, it's an extra HTTP query, but it is a very small file.)

2. About remembering and even predicting the user's favourite style

Walter Ian Kaye wrote:
I was wondering about that, and cookies and the like. Let's say a site has
defined three stylesheets -- "default", "hi-tech", and "easy-read" -- and
you want to specify somehow that whenever you visit that site, "hi-tech"
will always be chosen (assuming a valid link, of course). Should that be a
browser issue, or handled by cookie communication, or some other method?

And Charles Peyton Taylor wrote:
The reason I ask is that I have co-workers here who have 
vision problems, and it would be cool if the style sheet 
that was automatically loaded was one that had everything 
in large fonts.

Dave Raggett answered:
One way to handle this is via a short script embedded in a SCRIPT element.
The script would know which style sheet to use based upon access to user
preferences for the browser. This trades the need to standardize LINK
titles or classes for the API needed to access user preferences.
I'm not sure this solves the problem. The script will need to have access to information about the style sheet and we don't know what that information is unless we standardize it in some way. Besides, I think we should try to avoid allowing scripts to change the meaning or presentation of a document, since documents with scripts cannot be indexed and will not be supported by all types of Web User Agents.

I suspect there is no general solution. The browser can, of course, keep the user's chosen style in it's history file, so that the same style is used on a subsequent visit. Predicting about a new document that he user will want to use the `easy-read.css' instead of `hi-tech.css' requires a lot of intelligence.

What might be possible is to use HTTP content negotiation, at least in so far as there are parameters for the text/css media type. Parameters like medium=paper/screen, size=a4/a5/15inch, colors=hi/med/lo, etc. have been suggested.