- From: Dirk Schulze <dschulze@adobe.com>
- Date: Sat, 25 May 2013 08:30:13 -0700
- To: Rik Cabanier <cabanier@gmail.com>
- CC: Henrik Andersson <henke@henke37.cjb.net>, "robert@ocallahan.org" <robert@ocallahan.org>, Jeremie Patonnier <jeremie.patonnier@gmail.com>, "public-fx@w3.org" <public-fx@w3.org>, www-style list <www-style@w3.org>, www-svg <www-svg@w3.org>, David Baron <dbaron@dbaron.org>
On May 23, 2013, at 1:07 PM, Rik Cabanier <cabanier@gmail.com> wrote: > > > On Thu, May 23, 2013 at 12:43 PM, Henrik Andersson <henke@henke37.cjb.net> wrote: > Rik Cabanier skriver: > > > > 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. > > I thought there was an option to use the first result of a normal > selector as the masking content. > > Not that I know of. > Dirk, is there such an option? There is a selector, but this would just select direct <mask> childs (or <clipPath> childs for 'clip-path') of the target element. This mask could be used to mask the element itself. That is different from masking with text: <rect width="200" height="200" style="mask: child;"> <mask>…</mask> </rect> Masking with a text is possible by referencing a text element in your document with the element() function: mask-image: element(#idOfParagraph); Inverting the pixel mask will be possible with Filter Effects: mask-image: filter(image.png, invert(100%)); or mask-image: filter(element(#idOfParagraph), invert(100%)); However, I would not recommend that way unless you make sure that this is fully accessible for people with special needs and preferences. Greetings, Dirk
Received on Saturday, 25 May 2013 15:30:50 UTC