This is a read-only archive!

Firefox theming sucks

Firefox makes me sad. There are many reasons, but if I had to pick one, I'd say theming. Writing a Firefox theme is so ridiculously hard as to be pretty much not worth the effort. I wrote the Lila theme for Firefox a couple years ago. I kept up with it for a few Firefox versions, but there's just no way any sane person would want to continue doing so.

The theme itself is packaged as a jar file, for reasons that are beyond me. Inside this file are XML files which you get to hand-edit. Now, don't confuse Firefox's UUID with your theme's UUID (which you must generate manually in some way). Remember, em:targetApplication.Description.em:id is where YOUR UUID goes!

The whole layout is controlled by CSS. Not just CSS, but CSS with Firefox-specific crap mixed in. These CSS files are scattered randomly through a bunch of directories with helpful names like "browser" and "global" and "communicator". I assume some of these are leftover trash from Netscape, but I have no idea. There are many times you'll find two directories with the same name, and you have little idea which of them you should be using. global/icons or browser/icons? Beats me. Some folders contain image files that look like they were designed for Windows 3.1, which again I assume is some kind of legacy remnant of Netscape.

If you want to change the look of a single component of the display, you're likely required to wade through 4 or 5 levels of cascading CSS files scattered in multiple directories. The partial solution to this is apparently to stick !important on everything, to override everything that came before it. However this too loses its usefulness after the 4th layer of !important's overriding !important's.

$ grep -r '!important' `find lila -iname '*.css'` | wc -l
666

I didn't make that number up. How interesting.

At the time I wrote my theme, there was absolutely no documentation (that I could find) on how to do anything. Basically you were expected to wade through a couple hundred threads at MozillaZine or something. In practice what everyone did was grab someone else's theme as use it as a default, because otherwise you have no chance. (Clearly someone, somewhere came up with the FIRST theme, from which all others are derived. My theory is that this original theme was introduced into human society by extra-terrestrials or some kind of god-figure.)

The hoops you have to go through to test a theme while working on it is ridiculous. The normal theme install procedure for Firefox was designed by someone with a severe masochistic streak. Where is the Lila theme installed on your computer? If you guessed ~/.mozilla/firefox/01yf2p25.default/extensions/{9957f6c1-021d-4cbf-9462-26a0c1921fe4}/chrome, you're right! But that's just the location of your theme's jar file. If you want Firefox to read it in non-jar format, it's possible, but the method of setting it up can only be called black magic. But without doing this, seeing the result of making any change in your theme requires 5 minutes of fumbling.

Is there a difference between themes for Linux, OS X, and Windows? Clearly so, because those things are specified on the specs for each theme on the Firefox site. What exactly those changes are, or how to resolve them, I would not want to begin to guess.

The best thing is that every Firefox release completely breaks old themes. Even today at MozillaZine we have a 16 page thread about changes from 1.5 to 2.0. And there's already an 8 page thread about changes from 1.5 to 3.0 (God help us all).

Someone apparently updated my Lila theme for version 1.5 at the official Lila page. I installed it, and big surprise, it's broken. The RSS/secure connection icons in the toolbar are totally trashed in the layout. Menus have random highlighting problems. Etc. And here comes Firefox 2.0! Time to rewrite it again! Big chance this theme won't even install in version 2.0, let alone look correct. Nothing at all against whoever updated this theme; I tried to update my old one for version 1.5 myself and I just gave up. Not worth it.

September 07, 2006 @ 9:23 AM PDT
Cateogory: Programming

4 Comments

Peter
Quoth Peter on September 10, 2006 @ 12:52 AM PDT

wow. so glad to hear others starting to trash how impossible it is to write for Firefox. unreal.

good post!

Scott
Quoth Scott on December 31, 2006 @ 3:24 PM PST

Well since you've abandoned Lilia for Firefox could you at least get Mozilla to remove your aincient outdated version from their website?

It's presence raises false hope of updates (someday) for many....

On a related note, most Firefox themes are continauly updated. Do those developers just have too much free time?

Brian
Quoth Brian on January 04, 2007 @ 11:37 AM PST

I don't know how to get Mozilla to remove themes. They have been through at least 4 different methods of submitting and managing themes since I made that. In the beginning people just made bugs on Bugzilla, then they had a theme developer login thing that never worked, now I don't know what. Either way, the theme is there for anyone else who wants to update it.

I wouldn't say people have too much free time, but I would say it's a lot of time to devote, yes. More than I have.

byblo
Quoth byblo on January 27, 2007 @ 7:35 PM PST

I finally found where was hided the author of the lila theme for firefox :) I laugh a lot reading your paper, I thought exactly the same thing. In past, I almost lose my hand, beating it in my desktop too much when I tried to update your theme to firefox 1.5... I just fixed little things, useless since ff2 but if you are curious : http://users.skynet.be/fb119101/temp/lila-firefox-1.8.01.jar (yes an update from an update...)

I was thinking to rewrite the theme since the beginning (using your lila resources) but I abandoned when I saw the impressive list of changes from ff1.5 to ff2 ...

You are right, one must be inhuman to write a theme for ff... In fact, I didn't figure yet how this can be possible, maybe it is a secret experience by the army to figure people's reaction or something...

Unfortunately, I still loving this theme so much (by the way, thank you very much for the ff1 version!) so, I guess I'll be someday strong enough (and surely under drugs) to finally write a lila theme for FF2 (or ff3, depending the actual version in this future)