Firefox Extension for adding CSS?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Firefox Extension for adding CSS?

Post by Ambush Commander »

I'm currently limping by with GreaseMonkey, but I don't like how the original css gets loaded, and then the new loads on, causing the flash of unslightly style change.

So here's what I'm looking for:

Some websites have really atrocious color schemes. And that's a pity, because they have quite good XHTML. (::cough:: PHPPatterns ::cough::) Now, this makes it a pain to read, so why can't I override their stylesheet with one much nicer on the eyes?

GreaseMonkey is way too powerful a tool for me: the application of arbitrary JavaScript after a page is loading: one, is totally unnecessary, and two, causes the flash of badly styled content.

So, ideally, the extension would load the stylesheet for all the pages of a website, and use that to override all of the supplied styles. A slightly less ideal solution would be to simply disable styling for certain websites (you know it's gotten bad when the unstyled page looks better than the styled one).

Unfortunantely, I don't know how to concisely express this is a few words. Anyone know of a FireFox extension that does this?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

What you really want is user-applied stylesheets.

I know Opera does it really well, but I've never looked into the same for Firefox.

In a nutshell, it simply replaces the site's CSS with yours. Much easier than writing a Greasemonkey script.

Sorry I couldnt help more, but maybe that will put you on the right path..
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

wait till I get home. I have just such an extension..... though I hardly ever take advantage of it...heh
User avatar
trukfixer
Forum Contributor
Posts: 174
Joined: Fri May 21, 2004 3:14 pm
Location: Miami, Florida, USA

Post by trukfixer »

I believe the web developer extension will do the job - I have it, but have never tried it out as yet.. so I dont know i fthat is what you need..
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Actually, I have that extension.

It just doesn't do it automatically.
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Post by RobertPaul »

You want ChromEdit. Add your desired CSS to your userContent.css file. Unfortunately there are a couple 'gotchas:'

1) Unless the site has a unique id for the body i.e. (<body id="website">), you risk affecting other sites. Per-site userContent isn't available until Firefox 1.5 (though rumors say it should be out today or tomorrow).

2) Each attribute needs an !important after it. i.e. background-color: white !important;

Other than that, it's seamless.

There's got to be a way to do it via an extension (an XUL Overlay of some sort, I would think) but I've yet to figure it out.
Post Reply