W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2012

Re: Updated to the blending and compositing spec (was: minutes, December 10 2012, FXTF telcon)

From: Lea Verou <lea@w3.org>
Date: Wed, 12 Dec 2012 00:02:19 +0200
Cc: Cameron McCormack <cam@mcc.id.au>, public-fx@w3.org
Message-Id: <0D2B9956-C378-48FB-B9EF-8362278BBF04@w3.org>
To: Rik Cabanier <cabanier@gmail.com>
I realized what I’m suggesting below might not be very clear (hence the misunderstanding in the telcon), so I’ll make an attempt at making it more concise. **Naming is off the top of my head, please don’t focus on that.**

What I’m suggesting is that mix-blend-mode becomes a list that accepts multiple comma-separated blending modes. mix-blend could be a shorthand of mix-blend-mode and mix-blend-area. The latter would accept values like [ box-shadow | text-shadow | background | element ]# (regarding the hash multiplier: [1])

So, if you wanted to specify a multiply blending mode on both text-shadow and box-shadow, as well as a screen blending mode to the entire element, it could go like:

mix-blend-mode: screen, multiply;
mix-blend-area: element, box-shadow, text-shadow;

or, by using the shorthand:

mix-blend: screen element, multiply box-shadow, multiply text-shadow;

I believe that’s more elegant, concise and consistent with the rest of CSS than:

mix-blend-mode: screen;
box-shadow-blend-mode: multiply;
text-shadow-blend-mode: multiply;

and doesn’t require more than one new property.

[1]: http://www.w3.org/TR/css3-values/#component-multipliers

Lea Verou
W3C developer relations
http://w3.org/people/all#leahttp://lea.verou.me ✿ @leaverou






On Dec 11, 2012, at 23:13, Lea Verou wrote:

> This change sacrifices the previous flexibility with no obvious benefit for authors. The only one that benefits from this change is implementors. It doesn’t make the feature any easier to use or more elegant, nor does it simplify the additions to the language. With the previous design, the syntax would still be exactly the same, if all you wanted was to apply the same blending mode to all shadows/backgrounds/etc, due to the way CSS lists work.
> 
> The whole reason I suggested dropping that kind of flexibility was to avoid adding all these properties in the first place. I.e. if each "layer" of the element can only have one blending mode as a whole, then which blending modes apply to which parts of the element can be controlled by a single CSS property that accepts a comma separated list of identifiers (properties and some keyword that means the entire element) that correspond to a comma separated list of blending modes from mix-blend-mode.
> 
> Lea Verou
> W3C developer relations
> http://w3.org/people/all#leahttp://lea.verou.me ✿ @leaverou
> 
> 
> 
> 
> 
> 
> On Dec 11, 2012, at 20:02, Rik Cabanier wrote:
> 
>> 
>> 
>> On Tue, Dec 11, 2012 at 9:38 AM, Lea Verou <lea@w3.org> wrote:
>> Hi Rik,
>> 
>> I thought we agreed that the use case of applying different blending modes to different shadows/background images/etc was pretty rare and we'd resort to simpler syntax for now that covers the more common use cases? Did I misunderstand?
>> 
>> No, you didn't misunderstand.
>> The spec is updated so you blend the composited result of the shadows and the background images.
>> For instance, see https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#box-shadow-blend-mode:
>> Sets the blend mode of the composited result of all the box shadows.
>> 
>> I did not update background-composite since we didn't discuss it and currently matches an existing webkit only feature.
>> 
>> Rik
>>  
>> 
>> 
>> On Dec 11, 2012, at 03:52, Rik Cabanier wrote:
>> 
>>> All,
>>> 
>>> I updated the spec per today's decision: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html
>>> Please let me know if you have any questions or ideas for improvement.
>>> 
>>> Thanks!
>>>    Rik
>> 
>> 
> 
Received on Tuesday, 11 December 2012 22:02:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 December 2012 22:02:33 GMT