Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm not sure, whether this is garland-specific.
Anyway, when you set the "color" of an input field, please also set it's "background-color" (and vice versa). Otherwise the background color of the input (and select) fields is set by the web browser to a color which is usually OS theme-specific. Using an OS theme where the input controls are painted dark or black, black text in them remains invisible. I'm even writing this bug report into drupal.org practically blindfoldedly.
Comment | File | Size | Author |
---|---|---|---|
#11 | system_colors_conflict-213689-10.patch | 589 bytes | mgifford |
#9 | system_colors_conflict-213689-9.patch | 1.86 KB | floretan |
#6 | theme_vs_system.patch | 1.9 KB | Rowanw |
#5 | New patch | 896 bytes | jotik |
#2 | The patch. | 409 bytes | jotik |
Comments
Comment #1
jotik CreditAttribution: jotik commentedChanged version: 5.6 -> 6.0. Issue still occurs.
Comment #2
jotik CreditAttribution: jotik commentedHere's a trivial patch to fix this in the Garland theme and probably avoid some W3C CSS validation warnings about this issue. Anybody alive?
Comment #3
jotik CreditAttribution: jotik commentedStill occurs in Drupal 6.2.
Comment #4
Rowanw CreditAttribution: Rowanw commentedIt took me a while to realize what the problem was, but it's definitely a legitimate issue. When you set the foreground color of an element the background color should be specified at the same time, you can't guarantee that the background will always stay the same color across all devices and systems.
I haven't tested this patch but it looks good. Mental, can you make sure all the other core themes get the same treatment?
Comment #5
jotik CreditAttribution: jotik commentedOk, this will do for the Chameleon and Garland (and Minnelli?) themes on the screen. However, Garland also has a print.css for print media, and I can't promise that it will work properly for printing. Analyzing and rewriting the whole theme - I don't have the time. Where are your theme developers?
Some more remarks - Garland was the only theme always using custom input field colors. Chameleon only coloured the erronous input fields, which still produced this issue, so I changed it to handle all the input fields. The other themes don't specify custom colours for the input fields and therefore these just look ugly when using some dark-coloured system colour schemes, but they are still readable.
Comment #6
Rowanw CreditAttribution: Rowanw commentedI noticed that the Chameleon theme didn't have a background or foreground color on the body element, which is a big problem (the whole page changes color). I've created a new patch for this.
I also found a nice dark Ubuntu theme that I've decided to keep, however as Mental already pointed out, the d.org theme becomes much harder to use (I'm using a custom Human theme).
Comment #7
aclight CreditAttribution: aclight commentedAFAIK this is still a problem in head
Comment #8
jotik CreditAttribution: jotik commentedYes, the speed of fixing bugs at drupal.org is amazing. Whats the hold-up?
**discontent**
Comment #9
floretan CreditAttribution: floretan commented1 hunk failed.
CSS comments is not well-formatted(edit: all of chameleon's css files seem to have a non-standard formatting).Changing the border of input fields in chameleon has nothing to do with this issue.
Comment #10
cburschkaThank you so much for this one - I've had no end of trouble when using user themes in Firefox that switched the colors.
Please fix this comment
Should be
Comment #11
mgiffordComment #12
cburschkaI think you forgot to diff the other themes in this one.
Comment #13
mgiffordIsn't Garland the only official theme in D7 these days? Was for a moment in anycase. Well that and stark.
Let me know though.
Comment #14
cburschkaYou are right. I got confused because my checkout of HEAD still had all the old themes, but it turns out my checkout command lacked the -P parameter to prune empty folders (CVS has these quirks). Yep, they're all gone, so this is RTBC.
Comment #15
webchickCool, seems simple enough.
Committed to HEAD. Thanks! Marking down to 6.x for consideration. Needs to be ported so that it includes chameleon, etc. It's possible that one of the earlier patches is already ready to go, but someone needs to test it and mark RTBC.
@jotik, the hold-up is that in order for a bug to get fixed, it needs to a) be fixed in the latest version of Drupal and then back-ported, b) be reviewed by at least one or two people and marked "reviewed and tested by the community." This didn't happen until April 10, 2009, which explains the hold-up.
#drupal on IRC is a great place to trade patch reviews with others, make friends, and learn a whole lot. Hope you take that approach next time instead of getting frustrated. :)
Comment #16
webchickAhem. :P Moving down to 6.x for consideration. :P
Comment #17
webchickEh. Actually. I didn't initially see this, but this patch has the annoying effect of making all the input buttons white as boxes well, which is very jarring. So I've rolled this back for now, because we should figure out something else here.
FF3 Mac fwiw.
Comment #18
Bojhan CreditAttribution: Bojhan commentedDoesn't seem like a usability issue.
Comment #19
cburschkaThat looks very tricky to solve.
I believe the nice smooth button style is a browser default (Firefox; possibly only in Linux and Mac but I'm not sure), and the background color directive overrides this default.
The only way to comply with accessibility and keep the rounded buttons may be to go the other way: Don't specify a foreground color at all. This would turn the #494949 text in select and textfields black instead of dark gray, which may look ugly too (haven't tried it out).
Edit: Or Mac, I guess. I don't remember seeing it in Windows, but it's been a while.
Comment #20
cburschkaHere:
http://stuff.ermarian.net/arancaytar/images/drupal/background-before.png
http://stuff.ermarian.net/arancaytar/images/drupal/background-after.png
The difference between off-black and black is very subtle, but it's there if you look for it - and I predict criticism.
Comment #21
Rowanw CreditAttribution: Rowanw commentedIsn't it really just textareas and textfields that need to have colors applied? They're simpler than other UI elements, yet they can be the most jarring when they don't match the website's template.
When a button has a gradient and rounded corners it tends to fit in with almost any context, so I'd argue that buttons and drop downs should forego
color
andbackground-color
to stay consistent with the OS theme. Text fields, on the other hand, would needcolor
,background-color
andborder
just to be sure.Comment #22
mgiffordOk, so the patch in comment 11 is no longer in core for what it's worth.
Seems that by altering the form that FF breaks the nicely formatted buttons and goes with the clunky old school ones.
Could completely theme all buttons so that they fit a Drupal look/feel.
It's the same problem as the one defined here - http://drupal.org/node/418306#comment-1475908
Comment #23
Everett Zufelt CreditAttribution: Everett Zufelt commentedtagging
Comment #24
Everett Zufelt CreditAttribution: Everett Zufelt commentedTagging again
Comment #25
mgiffordI'm marking this as postponed as it seems to be dependent on the browser. I don't have any real docs on this and I think it's a browser bug that's not well documented.
In an article by 456 Berea Street - Incomplete colors for text input fields they warn people to define neither or both the font color and background color.
We might need to move this to won't fix if there isn't a better way around this.
Comment #26
mgiffordDoesn't seem to be a good way around this issue for now.
Comment #27
jotik CreditAttribution: jotik commentedIf there's no "good" way to fix it, it should not be fixed? I can't believe you guys! Fixing this means like a only adding a few lines of CSS which will not break anything! The way of handling this bug has been amazing!
Although this bug is not the only reason for it, this was the last drop into the chalice. The next CMS for me will not be Drupal. Bye.
Comment #28
mgiffordOk, that's fine. Please submit a patch. This issue has seen no movement for 10 months & it didn't seem like it was a resolvable issue.
Comment #29
Everett Zufelt CreditAttribution: Everett Zufelt commentedI'm tempted to close: won't fix this issue. But, let'sss move it to 8.x-dev in case some good solution is found.
The OS (or UA) is changing the background colour, it should be responsible for changing the foreground colour as well. If there was a good way to fix this, without causing other visual problems, then I would be in support of fixing in D7.
Retheming all buttons / form input controls is simply not possible for D7, but can be revisited in D8.
Comment #30
mgifford@jotik - I'd recommend making possible improvements with the accessibility in Drupal 7 with the Accessible Helper Module. Perhaps there's a way to work out this issue within this space so that it is tested & ready for D8.
Comment #31
amateescu CreditAttribution: amateescu commentedThe Garland theme has been removed from D8: #911054: Remove Garland from Core
Comment #32
mgiffordYup. But it's still an active problem with the code. I've just moved it to the contrib project.