4.7. Debug Corner: Diagnosing Buttons and Skins

If you are creating a theme, you may need to understand more deeply the way buttons (or any widget) are styled. Table 4.1 helps to understand the structure of the style system, but that is not a specific example. It is possible to trace the most important style information for an XUL widget directly. Here is how to do it for the <button> tag. This process can be applied to many tags.

The first step is to look at the file xul.css. Its URL is chrome://global/content.css, but the best way to find it is to look in the toolkit.jar file stored in the chrome and extract it. Inside this extracted file are one or more style rules for each XUL tag. It is the -moz-binding style property that is of interest. ...

Get Rapid Application Development with Mozilla™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.