Re: [csswg-drafts] [css-contain] Add contain-paint-margin CSS property (#4934)

Right. It's not a "please clip" property, it's a "if you would clip, please do so a bit further out" property.

An interesting question is whether it should apply to clip path or not. If it does, It probably should do so in a way that is similar to how shape-margin affects: take a single, possibly negative, value.

If we keep it to just contain:paint and overflow:clip, supporting 1 to 4 values to be able to differentiate between top / bottom/ left / right seems more useful, but I don't think that'd be possible to extend to clip-path.

As for negative values, I/we said during the call that there probably was no use for them, and therefore we should reject them. Actually, I'm not sure: if you know your box as 20px worth of blank padding on all sides in which nothing will ever intrude, you might want to clip to that using a negative clip-margin, which would allow the browser to skip repainting even if some of the element is on screen, as long as it's not more than those 20px.

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

Received on Friday, 8 May 2020 08:02:13 UTC