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
[css-paint-api] Box concrete object size #417
Comments
It is indeed supposed to be the size in px. Padding/border/margin is irrelevant here; you're not painting an element, you're painting an |
Not sure that padding/border/margin is irrelevant here, given a box we need to know which size to use, the only way I could see to calculate it involved border + margin. |
Yeah, but that's all encapsulated in the "figure out the size of the background-image"/whatever algorithm. It's not directly relevant to this specification at all; it just needs to know the concrete object size. |
OK, but in might be nice to link to https://drafts.csswg.org/css-images-3/#object-sizing-examples, and perhaps put a note to the effect that for background images the default sizing algorithm is the box size including padding, but excluding border and margin. |
Agree that linking there would be useful. |
I've added a link to the object-sizing-examples just below where |
When drawing a paint image (https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image), the image size is defined to be the concrete object size of the box (https://drafts.csswg.org/css-images-3/#concrete-object-size).
Experimentally, chrome uses the size in px, including the padding but not the border or margin. If this is the intended behaviour, the spec should probably say so.
The text was updated successfully, but these errors were encountered: