Re: [csswg-drafts] [css-backgrounds-4] `background-filter` (#4706)

> In Webkit and now our implementation, the filter is applied after any stretching that occurs in background-image. I think this is almost certainly correct - for example:

That is surprising!

I agree that the *effect* is likely what authors want, but it strongly feels like a layering violationg - `filter()` should *return* an image, which is then stretched by `background-image`.  Instead, I guess `filter()` is returning an "image with filtering instructions", which is then stretched by `background-image`, and then the "filtering instructions" are applied before the image is composited with other layers?

If that's what we want, we'll have to be *very* careful to describe that correctly, along with the timing instructions for when, precisely, to apply the filtering instructions.


>  it means you can apply a consistent blur to image-set(), for example, without having to worry about the resolution of the images.

I'll note that this happens no matter what - image-set() returns an image *with* resolution-adjustment already applied, so if one of the options is twice the size but 2x resolution, it'll look the same size to future steps. (At least, conceptually.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4706#issuecomment-628246104 using your GitHub account

Received on Wednesday, 13 May 2020 21:07:14 UTC