Re: Alternate stylesheets and the "disabled" DOM property

Some interesting proposals, and thank you for bringing up this very important topic.

First of all, I'm not really sure that #2 violates existing implementations so much, except, of course, for IE... which is often the trouble browser today. For example, choosing title "bill" from Mozilla's UI styleswitcher does select all stylesheets with that title, as per #2's statements. It does however ignore the "disabled" attribute on this switch, which I suppose violates 1 and part of 2.

Second of all, neither approach alone is entirely comprehensive for what programmers would likely want to do; that is:

1) Easily turn on and off Accessibility modifications to a page; this would almost certainly be sheet by sheet, so this corresponds with method 1.

2) Use a simple command to change designs, as in CSS Zen Garden; though it's questionable how widely this feature would really be used. This corresponds with approach 2, selecting one title.

Now, if the developer's goal is #2, and they @import all stylesheets related to a specific design into one master stylesheet, then method 1 makes everyone happy. This makes me lean towards method 1.

Further, using the title attribute to group stylesheets seems dangerous to me because, although it offers an interesting grouping mechanism, the grouping is necessarily only 1 level deep. Grouping is nice but, the @import mechanism already offers this functionality with infinitive levels of embedding, and scripting can ultimately import more CSS if needed.

It also seems a bad skewing of the meaning of the title attribute; certainly here it would mean something different from its more common usage, which is to describe a tag and its contents.

Finally, if method 2 were chosen, where would the "selectedTitle" attribute sit in the DOM? Would it? I hope it would for scripting's sake... . It seems existing standards already provide so much functionality for #1 that #2 doesn't make sense.

The only thing I have against #1 is the use of disabled="false" to mean "this is the only thing I want," an unfortunate double-negative introduced by another standard. It would be better if some other attribute could be used to turn stylesheets on and off... but of course this violates every styleswitcher script available today (not that they're very widely used, though fairly widely documented).

-Chris "SoopahMan" Moschini

Received on Monday, 29 September 2003 10:29:50 UTC