Any one out there know how to change the default CSS style used fordisplaying XML documents?

Currently, when I load an XML file in Firefox, it uses the “Basuc Theme”. I personally like the “Monospace” theme better and I’m tired of switching to it every time I load an XML file.

I’m sure the userContent.css file in my profile directly has something to do with it. If I just wanted to override all <p> tags on the web, it would be easy. However, I have no clue on how to target all XML content using that mechanism.

Anyone?

Update-ola! I’ve figure this out somewhat.

Open up Mozilla Firefox\chrome\comm.jar in WinZip or some such program and edit the XMLPrettyPrint.css file until your hearts content.

I simply added the monospace CSS from XMLMonoPrint.css file in the same location.

For giggles, I also tried changing the following in XMLPrettyPrint.xsl from:

<link href="chrome://communicator/content/xml/XMLPrettyPrint.css" type="text/css" rel="stylesheet"/>
<link title="Monospace" href="chrome://communicator/content/xml/XMLMonoPrint.css" type="text/css" rel="alternate stylesheet"/>

to something like

<link href="chrome://communicator/content/xml/XMLMonoPrint.css" type="text/css" rel="stylesheet"/>
<link title="Stock Style" href="chrome://communicator/content/xml/XMLPrettyPrint.css" type="text/css" rel="alternate stylesheet"/>

It didn’t quite work right. While it did change the font to monospace, the colors were no longer there. I’m sure it’s just an import/namespace order issue I missed.

Happy hacking.

See more posts about: www | All Categories