W3C home > Mailing lists > Public > www-style@w3.org > September 2003

Re: Alternate stylesheets and the "disabled" DOM property

From: fantasai <fantasai@escape.com>
Date: Tue, 30 Sep 2003 13:19:50 -0400
Message-ID: <3F79BB36.1030003@escape.com>
To: www-style@w3.org

Chris Moschini wrote:
> But Daniel, if a more powerful grouping mechanism already exists for
> stylesheets - @import - why group them again with the title
> attribute?

What if there's no @import directive in the style sheet language you're
using?

> I absolutely agree that this use of "disabled" warps the attribute's
> purpose, but why not simply use a different, more appropriate
> attribute? What if for example, the rel attribute were alterred from
> "alternative stylesheet" to "preferred stylesheet"? What if we added
> a new attribute instead of misusing an existing one, such as
> render="true"?

"disabled" isn't an HTML attribute of the <link> element. It's a DOM
attribute of the style sheet object, IIRC. Switching styles through a
UA mechanism or disabling stylesheets through the DOM should have no
effect on the value of the rel attribute.

Also, Boris wants to know how to implement the *existing* HTML syntax,
not how to create a better one.

> Consider a scenario in which a webpage has several buttons strewn
> about (perhaps 5 in a toolbar) that, when clicked, toggle several
> Accessibility features: High-contrast colors, larger fonts, etc.
> Assume that implementing these features each requires applying a
> stylesheet; the DOM scripting required would be overkill.
> 
> How would you handle this scenario in method #2, when only 1 title
> may be set as the Active stylesheet? You cannot enable more than one
> alternative sheet, so for example, enabling high contrast fonts and
> large fonts are mutually exclusive.

You would make them all part of the persistent style set and use
scripting to enable/disable them.

And that way, you could have three different design themes among
which the user can choose *while* having larger fonts. :)

~fantasai
Received on Tuesday, 30 September 2003 17:20:06 GMT

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