Re: [csswg-drafts] [css-images-4] Proposal to allow replaced elements to paint outside of their bounds (#7058)

I think this would work for both the overflowing pixels and pixels that are clipped to be smaller than the element box (e.g. with clip-path), since that allows us to capture just the bounds of the actual visible pixels and then use object-view-box to position them appropriately.

One question: presumably this has no direct interaction with something like witdth/height changes but is affected by transform changes, right? If we create an animation to change the width, we would have to create an animation to also change the object-view-box properties to change in tandem so that it looks like the element is shrinking and its drop shadow (for e.g) is changing shape but is remaining relative to the bottom right of the new element

I think that's fine, but if we can have some sort of a syntactic sugar to help, it would be awesome. Thinking out-loud: I'm thinking something like if we had object-intrinsic-size and object-view-box where the object-intrinsic-size would specify how big the replaced element naturally is and object-view-box is what you said (except that it only affects the pixel content size not the.. natural size (i fully appreciate that we might need new terminology)). Then if you do a width animation, you would note that the object-intrinsic-size doesn't match the element size anymore, and you can figure out exactly how to scale the object-intrinsic-size to make the two rects align. Then you apply that same scale to the object-view-box which should scale the pixel contents in the same way as the width animation is changing the element

Let me know if any of that makes sense and what your thoughts are

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 16 February 2022 00:32:55 UTC