Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fill-stroke] Add fill-blend-mode and stroke-blend-mode properties #134

Open
AmeliaBR opened this issue Apr 23, 2017 · 6 comments
Open

[fill-stroke] Add fill-blend-mode and stroke-blend-mode properties #134

AmeliaBR opened this issue Apr 23, 2017 · 6 comments

Comments

@AmeliaBR
Copy link

If we're going to allow layered fill and stroke, it would be very, very nice to be able to control the blend modes of the layers, in the same manner as the background-blend-mode.

@fantasai
Copy link
Contributor

grumbles about content-empty words like “mode” Oh, all right. :p

@mstange
Copy link

mstange commented Apr 28, 2017

I think this would be slightly different than background-blend-mode, because with background-blend-mode the blending only happens among the background layers of a single element, and there is an implicit isolated group around all background layers of the element. So no blending happens with anything behind the element.
But for fill-blend-mode and stroke-blend-mode you probably want to blend with content behind the element.

@AmeliaBR
Copy link
Author

@mstange

I don't see a problem with isolating the element, but I would want the shape as a whole (fill, stroke, and markers, after paint-order re-ordering) to be the isolated group. So a stroke layer could be blended with the fill, or markers with the stroke. (If you didn't want them to blend, you would just give the bottom layer normal mode.)

Once the element as a composite, isolated group layer has been painted, then mix-blend-mode would control how it blends with the background.

@AmeliaBR
Copy link
Author

(The alternative would be to have separate properties for blending within the fill/stroke stacks versus blending between them, and I think that overly complicates things.)

@dirkschulze
Copy link
Contributor

Adding normal to the bottom layer would not isolate the entire group. Top layers would blend with the bottom layer and the canvas below it. Imagine a half transparent bottom fill or a partly transparent pattern and you'll notice the difference.

That said, the isolation property would isolate the entire group. IMO @mstange does have a good point that we might rather want to have non-isolated blending by default.

@dirkschulze
Copy link
Contributor

@fantasai Would new blending properties for fill and stroke go into the Compositing spec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants