Re: [css-compositing] blending in canvas

On Thu, Nov 15, 2012 at 3:40 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> On Thu, Nov 15, 2012 at 2:46 PM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>> I like option 4, actually.  The existing blending/compositing
>> properties have pretty long names (and the names use inconsistent
>> conjugation, which is a bug that should be fixed).
>
> Is the the -ing of alpha-compositing vs blend-mode?
> If so, I will fix the spec.

Yes.  We generally avoid gerunds in our property names.  Don't know if
I want to bikeshed, but what about alpha-blend-mode and
color-blend-mode? Or, if we add a 'mix' shorthand, 'mix-alpha' and
'mix-color'?

I know we want to be familiar to people who have experience with these
abilities from elsewhere, but it's also important to keep things
consistent within CSS, and following CSS's general naming conventions.
 When we don't do that (to match some outside convention), it usually
looks like a mistake a few years later, when everyone knows about the
CSS properties.


>> They'll usually be
>> set together, but I can see use-cases for animating them separately.
>> This suggests a shorthand property.
>>
>> The email Dirk just sent, where he proposes an at-rule for defining
>> custom filters, uses the name "mix" for a descriptor that sets both
>> blending and compositing at the same time.  I don't know if it's too
>> short, but I like it.
>
>
> Are you suggesting a new css keyword 'mix: blend-mode composite-mode' or a
> new value for a css keyword that combines compositing and blending?
> So:
>
> alpha-compositing: <compositing mode>
> blend-mode: <blend mode>
> mix: <blend mode>  <compositing mode>  <- matches canvas'
> globalCompositeOperator

This one.  You could combine 'knockout' and 'isolation' into the shorthand too.

~TJ

Received on Thursday, 15 November 2012 23:47:52 UTC