Bug 115510 - Disabled textarea with transparent background-color does not render certain grey tones (foreground color) correctly
Summary: Disabled textarea with transparent background-color does not render certain g...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.8
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2013-05-02 03:36 PDT by Jens Nehlmeier
Modified: 2020-06-24 20:52 PDT (History)
4 users (show)

See Also:

Textarea with wrong rendered foreground color (1.58 KB, text/html)
2013-05-02 03:36 PDT, Jens Nehlmeier
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Nehlmeier 2013-05-02 03:36:13 PDT
Created attachment 200306 [details]
Textarea with wrong rendered foreground color

The summary pretty much speaks for itself.

If you do not specify a foreground color for disabled textareas, Webkit will lighten up the current foreground color to visualize the disabled status. 

Adding "background-color:transparent" to such a disabled textarea alters the behavior for certain grey tones. For example "color: #55555;" works as expected but "color: #A0A0A0"  results in nearly white text to be rendered instead of a light grey tone.

So with "background-color:transparent" WebKit does some wrong color calculations during rendering.

I have attached a demo that illustrates the problem. It contains a set of 4 textareas with different foreground colors. This set is repeated 4 times (enabled/disabled with and without background-color:transparent) and in the last set the last two textareas behave wrong (color is too bright).

Discovered using Safari on Mac OS 10.7 & 10.8, as well as Webkit Nightly for Mac.
Comment 1 Radar WebKit Bug Importer 2013-05-02 13:47:30 PDT
Comment 2 Craig Kovatch 2020-06-24 20:50:54 PDT
Interesting workaround for this -- WebKit interprets `transparent` as `rgba(0,0,0,0)`. If you set background-color to `rgba(255,255,255,0)` instead of `transparent`, results are as-expected.
Comment 3 Craig Kovatch 2020-06-24 20:52:06 PDT
This bug is also present on <input> elements