![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
What I was trying to do: to offer a default stylesheet, plus another small stylesheet which can be applied additionally to the default one. Preferably, the optional stylesheet should be initially in effect, but the user should be able to turn it off. |
|
it seems to me that what I want, in the terms described there, is one stylesheet which is what it calls "persistent", |

|
If I do just that, then Mozilla (View-> Use Style) loads the page initially with both stylesheets in effect, and offers me the opportunity to switch from the style "trick-ruby" to "basic page style" (which indeed is my default or so-called "persistent" stylesheet). So that's working as desired. |
|
If I look at the same thing on Firefox (1.5.0.1), it again loads the page with both stylesheets initially in effect, *but* then it offers me the choice of switching from my "trick-ruby" to "No style", which isn't what I intended. Where's my "persistent" stylesheet gone? |

|
|| hexadecimal EBB o-o decimal 3771 |
#3
| |||||||
| |||||||
|
|
What I was trying to do: to offer a default stylesheet, plus another small stylesheet which can be applied additionally to the default one. Preferably, the optional stylesheet should be initially in effect, but the user should be able to turn it off. My reading of the HTML4 spec (which is where this seems to be documented, though I reckon it's on-topic for this group): it seems to me that what I want, in the terms described there, is one stylesheet which is what it calls "persistent", defined by *not* having a title attribute on the link; and one stylesheet which has an informative title attribute ("trick-ruby" is its title in this case, as it happens). If I do just that, then Mozilla (View-> Use Style) loads the page initially with both stylesheets in effect, and offers me the opportunity to switch from the style "trick-ruby" to "basic page style" (which indeed is my default or so-called "persistent" stylesheet). So that's working as desired. If I look at the same thing on Firefox (1.5.0.1), it again loads the page with both stylesheets initially in effect, *but* then it offers me the choice of switching from my "trick-ruby" to "No style", which isn't what I intended. Where's my "persistent" stylesheet gone? |
|
So then I tried changing the optional stylesheet from rel="stylesheet" to rel="alternate stylesheet", even though it isn't really "alternate". Now, Mozilla loads the page with only the default stylesheet in effect initially (which isn't really what I wanted), while offering the options to display with "basic page style" or with trick-ruby, as before. Firefox also loads initially with "basic page style" in effect, but is now offering *two* other possibilities: No style, or my trick-ruby sheet. |
|
Opera (8.5) seems to be sort-of consistent with what Mozilla offers, in either case. |
|
MSIE (if anyone cares) in the alternate-stylesheet situation evidently hasn't included the trick-ruby optional stylesheet, nor can I see any UI to select it. |
|
To summarise: if I'm reading the spec aright, then indeed my default stylesheet should be defined by rel="stylesheet" and no title attribute; my optional stylesheet should be defined by rel=stylesheet (NOT rel="alternate stylesheet") and by my choice of title attribute. Mozilla and Opera 8.5 work as intended, and even MSIE does what I want initially (just that there doesn't seem to be a UI for turning the optional stylesheet off). |
|
Would it be going too far to say that Firefox has a user-interface bug, in as much as under these circumstances it only has the option to turn off all styles - rather than selectively turning off the optional one and leaving the so-called "persistent" one alone? The latter would be my understanding of the term "persistent", after all. |
|
I tried defining the trick-ruby stylesheet both as rel="stylesheet" and as rel="alternate stylesheet", but it didn't help at all. |
#4
| |||||
| |||||
|
|
"Alan J. Flavell" <flavell (AT) physics (DOT) gla.ac.uk> writes: What I was trying to do: to offer a default stylesheet, plus another small stylesheet which can be applied additionally to the default one. Preferably, the optional stylesheet should be initially in effect, but the user should be able to turn it off. Make the optional one preferred and @import the default one in it, and make the default one an alternate. |
|
it seems to me that what I want, in the terms described there, is one stylesheet which is what it calls "persistent", That's very naughty. ![]() |
|
It depends on what you desire. |
|
According to HTML 4.01, if memory serves, user agents should provide a possibility to disregard all style sheets. |
|
As CSS becomes more popular in mainstream authoring, that's becoming rather essential. |
#5
| |||
| |||
|
|
To summarise: if I'm reading the spec aright, then indeed my default stylesheet should be defined by rel="stylesheet" and no title attribute; my optional stylesheet should be defined by rel=stylesheet (NOT rel="alternate stylesheet") and by my choice of title attribute. |
#6
| |||||
| |||||
|
|
It seems that Firefox branched from Mozilla when the "No style" option was in the menu, but instead of changing the menu to describe the action, the action was changed to match the description. |
|
It seems that Mozilla has it wrong while Firefox has a defensible position. Mozilla doesn't allow the user to disable the persistent style sheet. |
|
Opera allows you to disable default and alternate style sheets but leave the persistent style sheet active in "Author mode" (similar to Mozilla), but it also allows you to diable all author style sheets by switching to "User mode" (like Firefox). |
|
You could make trick-ruby the default style sheet and have it import the current persistent style sheet, then make the current persistent style sheet the alternate style sheet. |
|
[3] <LINK> Navigation Bar; http://www.draig.de/LinkBar/index.en.html |
#7
| |||
| |||
|
|
Note that neither persistent nor preferred are "optional": if both declared then both have to be applied. |
#8
| |||
| |||
|
|
So the logical conclusion seems to be that in order to make the preferred stylesheet user-optional (which is what I wanted to do), it would be necessary to supply an empty "alternate" stylesheet for them to select. |
#9
| |||
| |||
|
|
So the logical conclusion seems to be that in order to make the preferred stylesheet user-optional (which is what I wanted to do), it would be necessary to supply an empty "alternate" stylesheet for them to select. No, see http://www.unics.uni-hannover.de/nht...orestyles.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |