W3C home > Mailing lists > Public > www-html@w3.org > April 2003

title attribute and stylesheets

From: Ernest Cline <ernestcline@mindspring.com>
Date: Tue, 22 Apr 2003 15:57:14 -0400
To: www-html@w3.org
Message-ID: <3EA5665A.17489.68A3D8@localhost>

> > I'll agree that using the title attribute to indicate whether an 
> > external style sheet is the preferred stylesheet is kludgy. 
> > However, since XHTML2 doesn't have to be backward compatable, it 
> > would be possible to change this behavior so that the only thing 
> > that the title attribute does is provide an advisory title. Perhaps
> > the navindex attribute could be used instead with external
> > stylesheets so that a navindex of 0 indicates the preferred
> > stylesheets?
> 
> Why? The idea was as simple as genial. The 'title' attribute will
> stay optional, and so you do not have to assign your style sheet
> integrations with a title.

The whole method of specifying the difference between 'preferred', 
'alternate' and 'persistent' external style sheets in HTML4 (and by 
extension the XHTML2 WD) is a kludgy one that depends upon whether or 
not a title attribute is assigned and what the rel attribute is set to. 
(See: http://www.w3.org/TR/html4/present/styles.html#h-14.3.2 )
However given that the Embedding and the Hypertext Attribute 
Collections are available for the style element, we could indicate the 
difference between these three without resorting to the link element. 
One slight change here from what I said earlier as navindex="1" and not 
navindex="0" normally indicates the first element to receive attention.

<style src="persistent.css" />
<style src="preferred.css" navindex="1" />
<style src="alternate.css" navindex="2" />
<style src="alternateprint.css" navindex="2" media="print" />
<style src="secondalternate.css" navindex="3" />

Using navindex in this way would also allow inline style sheets to be 
preferred or alternate style sheets while the current specification 
only allows them to be persistent. However I do see problems with this 
idea. The main one is that this gives navindex a totally different 
meaning for the style element as opposed to any other element. Perhaps 
a special attribute sheetindex with the same range of values (0 to 
32767) would suffice. I'm also not sanguine about having an index of 0 
indicating persistence as navindex="0" normally indicates that the item 
is among the last to receive any attention after those with positive 
indices do.
Received on Tuesday, 22 April 2003 15:57:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:55 GMT