While researching how to create a userChrome.css for Mozilla Firefox, I found out that you can do it in different ways:
Example 1:
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@-moz-document url(chrome://browser/content/browser.xul) {
#PanelUI-button {
display: none !important;
}
}
Example 2:
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#PanelUI-button {
display: none !important;
}
First example contains the line @-moz-document url(chrome://browser/content/browser.xul) and the second does not. I'm not sure what it does and ouput of both examples is exactly the same.
Are there any benefits by including @-moz-document url(chrome://browser/content/browser.xul) in userChrome.css?
@-moz-documentis the prefixed form of@document, a CSS "@-rule" which restricts the contained rules to certain URLs. So in this case,restricts its contained rules to
browser.xul.Without going too deeply into
userchrome.cssresearch, I expect this means the rules will only apply to "bits of Firefox", and not actual web pages.You could probably test it out by creating a page with an element of ID
#PanelUI-button, and see if thedisplay:noneapplies to it.