RESOLVED FIXED 21374
text-shadow is not drawn for text with transparent colour
https://bugs.webkit.org/show_bug.cgi?id=21374
Summary text-shadow is not drawn for text with transparent colour
nemo
Reported 2008-10-04 15:14:45 PDT
This page was playing around with the text-shadow decoration. Kind of a logical extension of the "eclipse" effect on: http://www.w3.org/TR/CSS2/text.html#text-shadow-props I was surprised that Webkit nightlies did not draw the shadow. Firefox nightlies, in comparison do. In terms of light sources, it'd be intuitive that text coloured "transparent" shouldn't "cast" a shadow. But, given this is a decoration, I hope this will be reconsidered. It's handy for all sorts of blurred letter effects. dhyatt seemed to think it should be. Thanks!
Attachments
Testcase (572 bytes, text/html)
2008-12-08 10:14 PST, Simon Fraser (smfr)
no flags
Make shadows independent of fill opacity (211.84 KB, patch)
2009-07-15 15:51 PDT, mitz
hyatt: review+
nemo
Comment 1 2008-10-16 08:16:58 PDT
BTW. A workaround is: http://m8y.org/tmp/testcase68.xhtml However this is kind of silly since it makes the text unselectable and complicates manipulation.
nemo
Comment 2 2008-10-16 08:24:37 PDT
http://m8y.org/tmp/testcase72.xhtml The workaround applied to variant of original bug report URL. Interestingly, I see that the svg "flames" also have a bug in Safari. Seems to be some "damage" bug related to repaint and display: none; I will test that in latest webkit and perhaps file another bug.
Simon Fraser (smfr)
Comment 3 2008-12-08 10:14:40 PST
Created attachment 25842 [details] Testcase
Simon Fraser (smfr)
Comment 4 2008-12-08 11:01:26 PST
nemo
Comment 5 2008-12-18 07:17:53 PST
re: comment #4 cool, don't know if my complaining about it inspired his thread, but the dates are pretty close. I'll fetch a latest nightly and see if, by any chance, it has been fixed.
Simon Fraser (smfr)
Comment 6 2008-12-18 08:45:42 PST
I don't believe it has been fixed. I looked into it a little; I think not drawing shadows for transparent text is a CG behavior which we'll have to work around.
Dave Hyatt
Comment 7 2009-07-15 12:45:23 PDT
See also: http://nicewebtype.com/notes/2009/07/12/rgba-text-shadow-in-safari-firefox/ In general, the alpha set on the text is "inherited" by the shadow.
mitz
Comment 8 2009-07-15 15:51:23 PDT
Created attachment 32818 [details] Make shadows independent of fill opacity One issue with this change is that it makes it impossible to have only the outline of text cast a shadow (which is currently possible by specifying -webkit-text-stroke: 1px black; color: transparent;).
Dave Hyatt
Comment 9 2009-07-15 16:04:24 PDT
Comment on attachment 32818 [details] Make shadows independent of fill opacity r=me
mitz
Comment 10 2009-07-15 16:11:38 PDT
mitz
Comment 11 2009-08-31 17:46:50 PDT
*** Bug 28861 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.