UserChrome-example.css: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(New article)
 
No edit summary
 
Line 2: Line 2:


An example [[userChrome.css]] file shipped with some Mozilla applications.  You might find this file in a profile's [[Profile_folder#Folders|chrome folder]].  Or you  might find it in the application's [[installation directory]], somewhere in the defaults directory there.
An example [[userChrome.css]] file shipped with some Mozilla applications.  You might find this file in a profile's [[Profile_folder#Folders|chrome folder]].  Or you  might find it in the application's [[installation directory]], somewhere in the defaults directory there.
Make sure that your userChrome.css file has these lines at the top, only lines with @import url(); should be before the @namespace line.
/*
  * Do not remove the @namespace line -- it's required for correct functioning
  */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */


To use the examples in the file, you must edit them so that the CSS rules are outside the comments.  For example, the file contains:
To use the examples in the file, you must edit them so that the CSS rules are outside the comments.  For example, the file contains:

Latest revision as of 14:32, 14 May 2008

An example userChrome.css file shipped with some Mozilla applications. You might find this file in a profile's chrome folder. Or you might find it in the application's installation directory, somewhere in the defaults directory there.

Make sure that your userChrome.css file has these lines at the top, only lines with @import url(); should be before the @namespace line.

/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */

To use the examples in the file, you must edit them so that the CSS rules are outside the comments. For example, the file contains:

/*
 * Make all the default font sizes 20 pt:
 *
 * * {
 *   font-size: 20pt !important
 * }
 */

To make this work in userChrome.css, change it to:

/*
 * Make all the default font sizes 20 pt:
 */
* {
font-size: 20pt !important
}

External links