MozillaZine

View --> Use Style

Discussion of features in Mozilla Firefox
Belbo
 
Posts: 16
Joined: November 5th, 2002, 8:36 am

Post Posted November 5th, 2002, 8:45 am

Hi @ all,

first I have to thank you for a wonderful Browser like Phoenix.
Now my question: In Mozilla you can go to the [View] Menu and select Use Style. You then have the option to choose another style for the page you are looking at if the author provides one. Is there any way to have this option in Phoenix too, or did I just not find it?

Belbo

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted November 5th, 2002, 8:48 am

This has been discussed before and will not be included in Phoenix. Hopefully, someone will make an extension for it soon.

Belbo
 
Posts: 16
Joined: November 5th, 2002, 8:36 am

Post Posted November 5th, 2002, 11:13 am

Can you point me to the discussion or tell me again what exactly the reasons were? I'm planning to play around with XUl a little bit, maybe this is something I could work on as a project.

Belbo

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted November 5th, 2002, 11:34 am

Belbo wrote:Can you point me to the discussion or tell me again what exactly the reasons were? I'm planning to play around with XUl a little bit, maybe this is something I could work on as a project.

Belbo


<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=178161">bug 178161</a>

Ted Mielczarek
 
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA

Post Posted November 5th, 2002, 3:23 pm

http://ted.mielczarek.org/code/altstyle.xpi

Ask and ye shall receive. It's just the Mozilla code ripped out and XPI'ed for your convenience. Seems to work fine for me on Phoenix 0.4, no guarantees though. You'll have to download it then open it in Phoenix to install it, I don't have time to hack up an install page.

Decent page to test it on: http://www.alistapart.com/stories/alternate/

clav
 
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK

Post Posted November 5th, 2002, 3:43 pm

i've also just made an xpi of this. Adds a toolbar button which pops up the menu rather than putting it under View -> Use Style.

the images for the button do not look good. If anyone could suggest/create something better i'd be happy to hear from them.

get the xpi from http://clav.marhost.com/cssmenu.xpi
You'll need to save the file to disk then drag the file into the phoenix window (or open it via File -> Open File) as the server is sending the wrong mime type.

I suggest the CSS Test Suites at http://www.w3.org/Style/CSS/Test/ as a good place to try it out

Ted Mielczarek
 
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA

Post Posted November 5th, 2002, 9:43 pm

Clav: very nice! I like your implementation. Only problem is the button doesn't exist in any other theme, so it looks horribly out of place. :)

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted November 6th, 2002, 12:05 am

I think I prefer to have this advanced feature in the menu, not as a toolbar button. Especially since it won't look good with any other theme than the default.

Ted, your extension has been added to the list.

Stefan

User avatar
 
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post Posted November 6th, 2002, 3:34 am

I must say that I agree with that placing the options in the menu would in the longrun offer a lot less hassle with themes.

But I am glad that there are now finally extensions for this nice feature :) (but I still think this should be in by Default in Phoenix ;) )

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted November 6th, 2002, 3:39 am

So, if I specify two different styles on a web page, how can I make the web page remember what the user selected the second time that user visits my site?

clav
 
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK

Post Posted November 6th, 2002, 4:23 am

personally i think that if you are going to have a menu to switch between alternate style sheets it needs to be easily accessible, or its just too much hassle to check whether the author bothered to provide any. Also if there are more than two stylesheets on offer you may want to switch several times in a row to try them all out, so easy access is again important. That's why i made it a toolbar button. If others prefer it on the menu then that's not a problem since Ted has provided an xpi to do that.

Having the button look out of place with other themes isn't too great a problem for me, since i like the Phoenix Classic theme, but i do appreciate that this will bother other people.


i've uploaded the extension to http://clav.web1000.com/cssmenu.xpi as well as the previous location. I think this server is sending the correct mimetype


another interesting site to test stylesheet switching on is the tabbrowser extension page at: http://www.cc-net.or.jp/~piro/xul/xul.en.html

Stefan

User avatar
 
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post Posted November 6th, 2002, 5:09 pm

clav wrote:personally i think that if you are going to have a menu to switch between alternate style sheets it needs to be easily accessible, or its just too much hassle to check whether the author bothered to provide any. Also if there are more than two stylesheets on offer you may want to switch several times in a row to try them all out, so easy access is again important.


Hmm, been thinking and have come to the conclusion that you are right. I also think I have come up with an idea that might work better then a button though.

Why not simply make it a small selectbox? (ie a cross between the googlebar and URL bar) It should require no to little customatization between themes and also provide an excellent notofication when there is more then 1 style to choose from (eg by using another background color if there are alternative styles).

In any case, to make style switching really usefull the browser should remember which style you have chosen for a certain site. Before that happens it's really only usefull for momentarilly turning off styles to check how your page looks at in non CSS browsers.

clav
 
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK

Post Posted November 6th, 2002, 5:30 pm

Stefan wrote:Why not simply make it a small selectbox? (ie a cross between the googlebar and URL bar) It should require no to little customatization between themes and also provide an excellent notofication when there is more then 1 style to choose from (eg by using another background color if there are alternative styles).

In the current implementation the popup menu is built dynamically when you click on the button. To do a select box you would need to create its menulist whenever a new page is loaded, or whenever the user switches tabs. This would require adding all kinds of event listeners for page load etc, which i'd rather not get in to. So, nice idea in theory, but a pain to implement in practice.

Incidentally using another background colour is not a particularly good choice as it may clash horribly with the current theme.

Stefan wrote:In any case, to make style switching really usefull the browser should remember which style you have chosen for a certain site.

Agreed.

Stefan wrote:Before that happens it's really only usefull for momentarilly turning off styles to check how your page looks at in non CSS browsers.

And for fixing pages designed by idiots who pick really unpleasant or unreadable colour schemes.


It would also be more useful if it allowed you to completely disable stylesheets for the page. At present you can only do this on sites that offer preferred stylesheets (by putting a title attribute on the link element), and not for sites using default stylesheets (which are listed in the menu as "Basic Page Style")

Yet another improvement would be to allow you to select standard style sheets through this menu as well. The W3C Core Styles for instance, or something like that, and possibly user defined stylesheets, which could make this a useful accessibility feature.

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted November 6th, 2002, 5:52 pm

Stefan wrote:In any case, to make style switching really usefull the browser should remember which style you have chosen for a certain site. Before that happens it's really only usefull for momentarilly turning off styles to check how your page looks at in non CSS browsers.


Isn't that up to the site? I've managed to create two separate stylesheets on Phoenix Help, and it remembers the selected style using javascript and a cookie. I got the code here: <a href="http://www.alistapart.com/stories/alternate/">http://www.alistapart.com/stories/alternate/</a>

Stefan

User avatar
 
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post Posted November 6th, 2002, 5:59 pm

clav wrote:
Stefan wrote:Why not simply make it a small selectbox? (ie a cross between the googlebar and URL bar) It should require no to little customatization between themes and also provide an excellent notofication when there is more then 1 style to choose from (eg by using another background color if there are alternative styles).

In the current implementation the popup menu is built dynamically when you click on the button. To do a select box you would need to create its menulist whenever a new page is loaded, or whenever the user switches tabs. This would require adding all kinds of event listeners for page load etc, which i'd rather not get in to. So, nice idea in theory, but a pain to implement in practice.


Hmm probably not worth it then. But then the at least button should definitly be made to flag the presence of multiple styles on the site.
People will quickly tire of pressing that button just to check if there are alternative styles, since most sites don't have it.
You really need to be informed of this when the page loads for it to ever be really usefull.

I can even envision something working like the (!) popupwarning in the lower left corner also for alternate CSS on a page.

It would also be more useful if it allowed you to completely disable stylesheets for the page. At present you can only do this on sites that offer preferred stylesheets (by putting a title attribute on the link element), and not for sites using default stylesheets (which are listed in the menu as "Basic Page Style")

Yet another improvement would be to allow you to select standard style sheets through this menu as well. The W3C Core Styles for instance, or something like that, and possibly user defined stylesheets, which could make this a useful accessibility feature.


Indeed, options like eg this would be nice
* Disable
* Default
* Alternate >
* Userdefined >

Return to Firefox Features


Who is online

Users browsing this forum: No registered users and 2 guests