NEW 115510
Disabled textarea with transparent background-color does not render certain grey tones (foreground color) correctly
https://bugs.webkit.org/show_bug.cgi?id=115510
Summary Disabled textarea with transparent background-color does not render certain g...
Jens Nehlmeier
Reported 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.
Attachments
Textarea with wrong rendered foreground color (1.58 KB, text/html)
2013-05-02 03:36 PDT, Jens Nehlmeier
no flags
Safari 16 display some disabled textarea different from other browsers (2.15 MB, image/png)
2022-09-30 15:45 PDT, Ahmad Saleem
no flags
STP174 vs Safari 16.5.1 vs Chrome Canary 117 (610.08 KB, image/png)
2023-07-22 03:25 PDT, Ahmad Saleem
no flags
Radar WebKit Bug Importer
Comment 1 2013-05-02 13:47:30 PDT
Craig Kovatch
Comment 2 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.
Craig Kovatch
Comment 3 2020-06-24 20:52:06 PDT
This bug is also present on <input> elements
Ahmad Saleem
Comment 4 2022-09-30 15:45:29 PDT
Created attachment 462736 [details] Safari 16 display some disabled textarea different from other browsers As can be seen from attached, Safari 16 do differ in disabled textarea and in few cases, in background-color: transparent as well. We should align with other browsers and make it better. Thanks!
Ahmad Saleem
Comment 5 2022-09-30 15:49:03 PDT
Chrome has following in UA Stylesheet for disabled: textarea:disabled { border-color: rgba(118, 118, 118, 0.3); and textarea:disabled { cursor: default; background-color: -internal-light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3)); color: -internal-light-dark(#545454, #aaaaaa);
Karl Dubost
Comment 6 2023-02-01 15:39:23 PST
Thanks Ahmad. In terms of readability the case with transparent is pretty bad.
Ahmad Saleem
Comment 7 2023-07-22 03:25:34 PDT
Created attachment 467088 [details] STP174 vs Safari 16.5.1 vs Chrome Canary 117 @Karl - I think it is just duplicate of another bug you fixed to make 'disabled' textarea content more readable.
Note You need to log in before you can comment on or make changes to this bug.