Re: Alternate stylesheets and the "disabled" DOM property

> For example, choosing title "bill" from Mozilla's UI styleswitcher does
> select all stylesheets with that title, as per #2's statements.

This behavior is actually identical between approaches #1 and #2 -- in both
cases an API would be exposed on the document to select a given style set by
title.  The only question is whether disabled sheets with that title would
become enabled in the process (in approach #1 they would, but not in approach
#2).

Mozilla, in fact, implements approach #1, with the exception of a lack of easy
API for selecting a style set.

> 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.

Good point.

> 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 corresp=
> onds with approach 2, selecting one title.

Again, you can select one title in either approach; the only question is what
that does, exactly.

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

Also a good point.

> It also seems a bad skewing of the meaning of the title attribute; certainl=
> y here it would mean something different from its more common usage, whic=
> h is to describe a tag and its contents.

Possible, but the HTML specification normatively defines the title attribute of
<link> with rel="stylesheet" to have this meaning....

> 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...

On an interface implemented by the document object.

Such an attribute would need to exist in any case, because switching style sets
is so much faster than enabling/disabling individual sheets (because you can
batch all the sheet munging before reresolving style).

Thanks for the feedback,
Boris
-- 
    "What the hell are you getting so upset about?  I
thought you didn't believe in God."
    "I don't," she sobbed, bursting violently into
tears, "but the God I don't believe in is a good God, a
just God, a merciful God.  He's not the mean and stupid
God you make Him out to be."

                     --Joseph Heller, "Catch-22"

Received on Monday, 29 September 2003 11:17:58 UTC