Style sheet selctor does not display if there is no stylesheet with a title.




15 years ago
13 years ago


(Reporter: WG9s, Assigned: David Hyatt)


Firefox Tracking Flags

(Not tracked)





15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030810 Mozilla Firebird/0.6.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030810 Mozilla Firebird/0.6.1+

If a web page loads a stylesheet, but does not specify a title as in:

 <link rel="stylesheet" href="/styles.css" type="text/css" media="screen">

Then it is not possible via Firebird to render the page ignoring the style
sheet.  This is becuase the status bar style selector does not appear in this
case. The extension StyleSelector did not have this limitation (although the
taskbar item was grayed out in this case it did allow style sheet changes).

When you load the page  which has the above
stylesheet reference the problem exhibits itself.  If you load the page  which uses the exact same stylesheet, but I changed
the reference to:

 <link rel="stylesheet" href="styles.css" type="text/css" media="screen"

the stylesheet selector icon is displayed.

Reproducible: Always

Steps to Reproduce:
1. Visit the page

Actual Results:  
The style sheet icon does not appear on the status bar

Expected Results:  
Displayed the style sheet icon

Comment 1

15 years ago
Style sheets without a title are supposed to be "base styles" that are always
applied. This is probably WAD, although what would be nice is the ability to
select that *no* style sheet be applied.

Comment 2

15 years ago
Well, if that is the case then it is not working as designed or at least is not
consistant in the way it works.  If you have a basic style designed (no name)
and a named style as well, then you get the choices of displaying it 3 ways. 
With the named style, with the basic style or with no style.  I just want the
coice of the basic style or no style if only an unnamed style sheet is loaded
which would make it at least consistant with itself.

Comment 3

15 years ago
It does seem a little inconsistent at first, I must admit. 

But there are some issues to consider as well. On some of the pages I'm creating
I have a basic untitled stylesheet that covers such things as list item setbacks
and column positions. To that I add a number of titled stylesheets that alter
the actual appearance (colours basically). So the notion of selecting the
untitled stylesheet in preference to one of the others doesn't really make any
sense (or vice versa). There is also the issue of what to do if the styles are
fully contained within the page itself and not in an external stylesheet. In
some sense we then almost need to always show the stylesheet selector, so as to
give the option of ripping any styling should the user see fit to do so.

That can be done by the user:

Doing that of course removes one of the main benefits of the stylesheet switcher
- its informative value that other styles exist for that page. So there doesn't
really seem to be any straight forward way out of this. I do think though that
we would benefit from a "Use Style" menu item under View (as in Mozilla Nav)
that always contained No Theme and Basic Theme options. That way the user can
always strip any styling without losing the informative value of the icon when
it shows up.

Confirming and sending to Hyatt for further consideration on this.
Assignee: blake → hyatt
Ever confirmed: true
OS: Windows XP → All

Comment 4

15 years ago
This is something of a response to my previous comment #3

From Pinball 0.7.4 onwards, a blank icon is shown permanently. If there is any
styling you can select between none and basic. If there is no styling at all it
is only basic. When you open a page that has alternate stylesheets the icon
changes so that it is no longer blank. Here's the approximate code that you need
to accomplish this in userChrome.css.

/* Always show Style Sheet Switcher icon in status bar */
#page-theme-button {
   display: -moz-box !important;
   list-style-image: url("path://to/some/icon/of/choice.png") !important;
   padding: 0px 3px 0px 3px !important;
#page-theme-button[themes] {
  display: -moz-box;
  list-style-image: url("chrome://browser/skin/page-themes.png") !important;
  padding: 0px 3px 0px 3px !important;

This was lifted from both FBH and the default theme, and then a few !importants
thrown in where needed. So basically the icon choice.png (which should be 16x16
pixels) is shown most of the time whilst the regular crayon box icon (or its
theme equivalent) is displayed when the page has an alternate stylesheet.

I think this should be done for the default theme (one could turn the present
icon into a grayscale for the no-theme image) so that there is always something


15 years ago
QA Contact: asa


15 years ago
QA Contact: davidpjames
david, you're right in your comment in the other bug, this is indeed a WONTFIX. covers external
stylesheets, including the format for definining alternate/preferred/persistent
sheets.  Since the lack of a title element is to be interpreted by the UA as
making the stylesheet persistent (with the contained styles to be inherited by
any alternate stylesheet) the styleswitcher should only appear when there are
styles to switch.  If you want Firebird to always show the icon so you can strip
CSS entirely, use the userChrome.css entry in the previous comment to make this
change for yourself.
Last Resolved: 15 years ago
Resolution: --- → WONTFIX

Comment 6

15 years ago
Well, if the stylesheet that has no title is NOT supposed to be able to be
overriddent by this interface, then it is still broken.  If there is only one
style sheet and it has no title, then it is not possible to tuen it off via this
interface.  You say that is correct behavior and I guess I am willing to go
along with that now that you have explained it.  However if a page has 2 style
sheets, one with a title and one with no title, it is possible to turn off all
style sheets on the page.  If the styelsheet without a title is not supposed to
be able to be turned off, then it is broken.

Sample URL illustrating issue:

The "No theme" choice should not be available according to your explanation.

I am only asking that it be made to be consistant.  Either always allow
overriding a style sheet with no title even if it si the only style sheet, or
never allow overriding it even if other titled stylesheets are present.
Resolution: WONTFIX → ---

Comment 7

15 years ago
Sorry, I obvisouly meant:

Comment 8

15 years ago
William has got a good point there in comment #6. Why do we show a No Theme 
option at all? Basic removes alternate styling but leaves persist styling in 
place. No Theme goes a step further and removes persistent styling. So the 
question is why do we allow for the removal of peristent styling on pages with 
alternate styling but not on pages without alternate styling? 
Like it or not, we've got an inconsistency here that can be resolved by (1) 
always showing a greyed out icon (as PB does and the Stylesheet extension 
does), (2) by creating a View menu item where No Theme is always an option or 
(3) removing the No Theme option altogether. 
The reason we should do (1) or (2) is to allow for printing. Some pages do 
include a [sometimes hidden] print stylesheet (media="print"), but since that 
is not required by W3C (as W3C largely deals with onscreen display issues), 
we, as the UA, ought to facilitate printing. We do appear to impose a printing 
stylesheet of some sort, but it isn't the same as No Theme (more like basic 
with a white background and black lettering). Try printing Eric Meyer's 
Complex Spiral demo page for example - not bad, but there are still some funny 
results. But if you use No Theme you get only the content. Now suppose Eric 
had made the style persisent and not offered any alternate stylesheets - the 
user would not have a decent way of printing such a page. 
The UI design behind the statusbar notification area is that something appearing
there is a notification of something additional that can be done.  If people
intend to use it for choosing alternate stylesheets (the primary reason for it
being there) then it is inherently less useful to have it always visible,
otherwise users get no obvious visual indication that alternate stylesheets are
even available.  They could check manually, but that is a major loss for
usability.  (I've used the newer Pinball versions, I found it unusable and
didn't feel like hacking my userChrome.css to make it sane again)

As for removing No Theme, I think that its not completely useless, and some
people will want to have that option as part of the style switcher.  And of
course, if people always want the style switcher on, they can edit
userChrome.css.  But given the choice, No Theme should go instead of turning
this on at all times.  If either of you feel strongly enough about it, file a
new bug and cc me on it.

Restoring WONTFIX.
Last Resolved: 15 years ago15 years ago
Resolution: --- → WONTFIX
Summary: Style sheet selctor does not display if the sytylesheet does not have a title → Style sheet selctor does not display if there is no stylesheet with a title.
verified wontfix
*** Bug 235984 has been marked as a duplicate of this bug. ***
filed bug 251694 for it
*** Bug 251694 has been marked as a duplicate of this bug. ***

Comment 14

13 years ago
I appeal the decision to leave the bug as is.

The specification of HTML 4.01, section 14.3.1, "Preferred and alternate style
sheets" (<>):

"User agents should also allow users to disable the author's style sheets
entirely, in which case the user agent must not apply any persistent or
alternate style sheets."

User Agent Accessibility Guidelines 1.0, checkpoint 4.14, "Choose style sheets
(P1)" (<>):

"Allow the user to turn off (i.e., ignore) author and user style sheets."

Those two passages state the terms of compliance, yes? What, if anything, can I
add to make the case in favor of compliance?

(Being a newcomer, I left the severity of this bug at "normal", although I
consider a violation of Priority-1 accesibility checkpoints to be a major bug.)
View->Page Style addresses what you cited.  Citing accessibility guidelines for
UI that is inaccessible is really kinda arguing a multi-stage path.

Anyway, please look around before making assumptions.
You need to log in before you can comment on or make changes to this bug.