Re: [css-compositing][css-mask] new Editor's draft posted

On Thu, May 23, 2013 at 11:40 AM, Henrik Andersson <henke@henke37.cjb.net>wrote:

> Rik Cabanier skriver:
> >
> >
> > On Thu, May 23, 2013 at 4:22 AM, Henrik Andersson <henke@henke37.cjb.net
> > <mailto:henke@henke37.cjb.net>> wrote:
> >
> >     Rik Cabanier skriver:
> >     >
> >     > From http://www.myprovence.fr/en#p_home, notice the pulldown tab
> that
> >     > says "An event MP2013".
> >     > The designer had to rasterize this to an image because there's no
> >     way to
> >     > draw this with CSS. If he had blending, he could have drawn the
> >     text as
> >     > a black div with white glyphs and apply a 'darken' blend mode. This
> >     > blend mode would pick the darkest color, which in this case would
> >     be the
> >     > clouds and the sky of the backdrop.
> >
> >     I'd call that an inverted mask. Not a blend mode.
> >
> >
> > How would you do an inverted mask in HTML?
> > This is a valid use case for blend modes.
>
> Indeed, how? CSS masking does not currently support inverted masks. But
> it could easily be adjusted to allow for inverse masks
>

It would not.
An 'inverse' mask would invert the pixels of the mask itself, not the
content that you mask.

Maybe you're thinking of putting the text in the mask. If so, yes, that
would make it invert but:
- you'd lose the semantics since the text comes from a style. This loses
accessibility and copy/paste behavior
- you would have to put the text in another fragment or document
- you would have to define a way to link to HTML content from a mask. This
would be very hard to get consensus on.

Received on Thursday, 23 May 2013 19:34:14 UTC