Before we begin:

I have compiled Firefox already I have not compiled Firefox

Let's get started

What operating system do you use?


OS X (Apple)


Great! Time to set up your development environment!

Sorry, this part of the training mission is incomplete. Please follow the steps at the wiki and continue once your development environment is set up.

All the remaining steps in this tutorial will require you to be running this mozilla-build environment.

I'm finished!

Great! Time to set up your development environment!

If you run this script in your terminal, the packages required to build Firefox will be installed.

wget --no-check-certificate && python

If you prefer to set it up yourself, then follow the steps at our wiki.

I'm finished!

Let's download the source code for Firefox.

Run hg clone to get it. This is going to take a while.

It's done!

Time to build Firefox.

Go to the new mozilla-central directory, and run ./mach build. This is going to take a very long time.

It's done!

Let's make sure it works!

Run ./mach run -P blank. If the profile manager dialog appears, create a new profile named blank and continue starting Firefox.

Please visit #introduction on and explain the problem you're having.

My new version of Firefox works! Firefox didn't start.

Time to have some fun.

Choose a training mission:

Turn your tabs green with CSS!

Turning your tabs green

The important thing to know about this mission is that Firefox's stylesheets are stored in browser/themes/ and toolkit/themes/. The first path is for Firefox-specific theming, while the second is for theming shared by all Gecko-based applications (such as Thunderbird).

See if you can find the right stylesheet to change under browser/themes/. There are different themes for each major platform (Windows, OS X, and Linux), so make sure you look in the correct subdirectory (ie. browser/themes/linux/ if you're using Linux).

It might be tempting to look at searchbar.css, but that only styles the small input bar where you can quickly access major search enginges. You should look at browser.css, which contains the styling rules for the majority of the Firefox user interface.

I found the file! I need a hint.

Turning your tabs green

It turns out that browser.css has a lot of rules in it. Let's narrow down the actual rule we want to change.

It's time to use Search Fox, the Mozilla Code Search tool. You can search for "browser.css" and take a look through the results; see if any of the files that show up look like good candidates!

You can focus on XUL and XML files, which are used to define Firefox's user interface. Often, CSS files share filenames with the files that they are styling - in this case, browser.xul looks like a good match.

I found one! I'd like a hint.

Turning your tabs green

browser.xul is a pretty big file, so it's usually best to search for keywords to find relevant parts. In this case, try searching for "tab" and see if you come across anything useful (such as a class or id attribute). If you do, see whether you can find the selector in browser.css.

In your search, you should come across a <tabs> element that represents the tabs in Firefox's interface. Everything you need can be found there, since it has a <tab> child with a class attribute that is present in browser.css.

I found one! I need a hint.

Turning your tabs green

Now that you have a selector to change in browser.css, all that remains is to make your changes and rebuild Firefox. You can perform a full build (./mach build), but in this case it is much faster to just rebuild browser/, like so:

./mach build browser/

When this is finished, run the local Firefox build and see whether your changes worked!

Please visit #introduction on and explain the problem you're having.

My tabs are green! It didn't work.

Created by Josh Matthews. Patches welcome on github.