- From: Rik Cabanier <cabanier@gmail.com>
- Date: Tue, 11 Dec 2012 14:40:28 -0800
- To: Lea Verou <lea@w3.org>
- Cc: Cameron McCormack <cam@mcc.id.au>, public-fx@w3.org
- Message-ID: <CAGN7qDDjNqxbc9Ox8VWPMvVmQyZP5SZCLOTWUHm1UX4F2yLejQ@mail.gmail.com>
Hi Lea, thanks for the clarification! On Tue, Dec 11, 2012 at 2:02 PM, Lea Verou <lea@w3.org> wrote: > 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. > I don't particularly like that this forces you to always specify what part of the element you want to blend. Most likely, 99% of blending will just target the element and now those users will have to write either 2 css properties or put 'element' in the shorthand. How about we drop the '-area' property and assume in the shorthand that no area means that that blend should apply to the whole element? So your case becomes: mix-blend: screen, multiply box-shadow, multiply text-shadow; The mix shorthand could look like this: mix: screen source-out, multiply box-shadow, overlay destination-over text-shadow What do you think? > 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#lea ✿ http://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:41:03 UTC