Bug 21374 - text-shadow is not drawn for text with transparent colour
Summary: text-shadow is not drawn for text with transparent colour
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Normal
Assignee: mitz
URL: http://m8y.org/tmp/testcase67.xhtml
: 28861 (view as bug list)
Depends on:
Reported: 2008-10-04 15:14 PDT by nemo
Modified: 2009-08-31 17:46 PDT (History)
4 users (show)

See Also:

Testcase (572 bytes, text/html)
2008-12-08 10:14 PST, Simon Fraser (smfr)
no flags Details
Make shadows independent of fill opacity (211.84 KB, patch)
2009-07-15 15:51 PDT, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:

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

dhyatt seemed to think it should be.

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
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]
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:


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

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. ***