Closed Bug 452291 Opened 16 years ago Closed 16 years ago

userContent.css background color not honored in inputs, buttons and textareas

Categories

(Firefox :: Disability Access, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 450868

People

(Reporter: silas-mozilla, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1

When I use a userContent.css with dark background and light foreground such as the ones at http://people.pwf.cam.ac.uk/ssb22/css/ (note that these CSS files take care to explicitly set everything, so it's not an issue of interacting with the page's own stylesheets, and I've reproduced this on pages that don't use CSS at all), I get inputs, buttons and textareas showing white background and light foreground, hence unreadable.  However, if I delete the userContent.css and instead paste its contents into a <style> block at the top of the document, it works perfectly.  It fails if and only if it's userContent.css, not if it's pasted into the document.

Firefox 2 does not have this bug.

I have tried deleting parts of the userContent.css but cannot find any subset of it that solves the problem.  The only thing I did find was that setting <style> input{border:inset grey} </style> in the document HEAD causes input boxes to behave correctly (background color is as specified in userContent.css when this is present).  However, "border: inset grey" in userContent.css itself (instead of in the <style> markup) does not have that workaround effect.

(By "the document" I mean ANY document.  I reproduced all this using only <BODY><INPUT TYPE=text></BODY> but also on Google, eBay and a lot of other sites that had input fields and buttons.  It is not site-specific.)

So the only way to make sure that userContent.css works every time is to add it with a GreaseMonkey script instead of having it in userContent.css, or to use a Javascript bookmarklet that adds it.  But that's not good, because GreaseMonkey is not always installed in computer labs etc, and a bookmarklet needs to be manually selected for every page.

Reproducible: Always

Steps to Reproduce:
1. Set a userContent.css with dark background and light text.  I used http://people.pwf.cam.ac.uk/ssb22/css/ to get one.
2. Go to any web page that has a form on it with input fields and buttons (www.google.com will do)
Actual Results:  
Inputs are displayed with white background and light text, hence unreadable.

Expected Results:  
Inputs are displayed with the colours specified in userContent.css
You're right.  Sorry I failed to find it when I searched before.  I have now added -moz-appearance:none to the stylesheet generator at http://people.pwf.cam.ac.uk/ssb22/css/ and everything works perfectly.  Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.