Bug 21374

Summary: text-shadow is not drawn for text with transparent colour
Product: WebKit Reporter: nemo <bugs>
Component: CSSAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: hyatt, lea, mitz, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
URL: http://m8y.org/tmp/testcase67.xhtml
Attachments:
Description Flags
Testcase
none
Make shadows independent of fill opacity hyatt: review+

Description nemo 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!
Comment 1 nemo 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. 
Comment 2 nemo 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.
Comment 3 Simon Fraser (smfr) 2008-12-08 10:14:40 PST
Created attachment 25842 [details]
Testcase
Comment 4 Simon Fraser (smfr) 2008-12-08 11:01:26 PST
See this thread: <http://markmail.org/message/y3j2dvizo2o6tybu>
Comment 5 nemo 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.
Comment 6 Simon Fraser (smfr) 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.
Comment 7 Dave Hyatt 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.
Comment 8 mitz 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;).
Comment 9 Dave Hyatt 2009-07-15 16:04:24 PDT
Comment on attachment 32818 [details]
Make shadows independent of fill opacity

r=me
Comment 10 mitz 2009-07-15 16:11:38 PDT
Fixed in <http://trac.webkit.org/projects/webkit/changeset/45956>.
Comment 11 mitz 2009-08-31 17:46:50 PDT
*** Bug 28861 has been marked as a duplicate of this bug. ***