W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: [css3-background] blending on 'box-shadow' and 'text-shadow'

From: Charles Pritchard <chuck@jumis.com>
Date: Tue, 10 Apr 2012 17:11:45 -0700
Message-ID: <4F84CC41.3010307@jumis.com>
To: Simon Fraser <smfr@me.com>
CC: Rik Cabanier <cabanier@gmail.com>, www-style list <www-style@w3.org>
On 4/10/2012 4:01 PM, Simon Fraser wrote:
> On Apr 10, 2012, at 3:52 PM, Rik Cabanier wrote:
>> All,
>> I'm currently working on the blending specification 
>> (http://blogs.adobe.com/webplatform/2012/04/04/bringing-blending-to-the-web/) 
>> and someone brought up that a very common use case for blending is 
>> drop shadows.
>> Some of our applications such as Photoshop, Illustrator and InDesign 
>> set the shadow to multiply by default since it provides a more 
>> pleasing appearance that can't be done with simple alpha blending. 
>> See http://css-tricks.com/dont-use-black-for-shadows/ for a 
>> discussion on why this is.
>> Would there be interest in an additional keyword to specify blending 
>> to 'box-shadow' or 'text-shadow'?
>> the syntax could look like:
>>     box-shadow: 64px 64px 12px 40px rgba(0,0,0,0.4) multiply
> Using a different blend mode just for the shadow would place a burden 
> on implementers who use hardware acceleration of various kinds (i.e. 
> most of us now).
> Imagine a box-shadow overlapping a playing video. The implementation 
> has to separate the shadow into its own GPU texture, and composite 
> that with a different blending mode from the rest of the element, for 
> every frame of video.

That's likely the point. This doesn't seem like a great burden for 
hardware accelerated implementations.

Is the burden on the implementer to write the code; or are you concerned 
about a blended drop shadow requiring too-many cycles?

I've seen some video demos where the shadow for the video itself changes 
for each frame (based on edge pixels), and they've run just fine on 
typical hardware.

I'd really like to see this feature, especially for situations like 
video, as it provides a "more pleasing appearance" to the end-user.

Received on Wednesday, 11 April 2012 00:12:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:14 UTC