w3c / fxtf-drafts

Mirror of https://hg.fxtf.org/drafts
https://drafts.fxtf.org/
Other
68 stars 49 forks source link

[css-masking-1] Add a "fill" option for mask-repeat #489

Open Azmisov opened 1 year ago

Azmisov commented 1 year ago

When you are using mask-composite with mask-repeat=no-repeat, the area outside the mask bounds (as given by mask-size) is treated as transparent. In certain cases, I would have liked the option to treat the outside area as opaque instead. E.g. I want to use an "inverse" of a mask (all alpha inverted) as one of the layers, but for it to work, all area outside the mask-size should have been inverted. I've run into a few cases where I've needed to use 1-2 extra full-size masks to mimic the effect. My proposal would be to add a fill option to mask-repeat, which behaves like no-repeat except filling the outside area with 100% opacity instead of 0% opacity.