[Webkit-unassigned] [Bug 225015] New: Block sizing is miscalculated for elements with a preferred aspect-ratio when padding is applied, and content can overflow.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Apr 24 08:15:49 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=225015
Bug ID: 225015
Summary: Block sizing is miscalculated for elements with a
preferred aspect-ratio when padding is applied, and
content can overflow.
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Blocker
Priority: P2
Component: Animations
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jensimmons at apple.com
CC: dino at apple.com, graouts at apple.com
When `aspect-ratio` is applied to a box with content, the box should prevent overflow by growing to be tall enough to fit the content, plus space for whatever margins or padding are involved.
>From the spec:
>In order to avoid unintentional overflow, the automatic minimum size in the ratio-dependent axis of a box with a preferred aspect ratio that is neither a replaced element nor a scroll container is its min-content size clamped from above by its maximum size.
https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum
This works in the WebKit implementation, unless there is padding applied to the box. It looks like the padding is being subtracted from the height, instead of added, or something similarly weird.
Example: https://labs.jensimmons.com/2021/aspect-ratio/04-bug.html
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210424/ed1a0771/attachment-0001.htm>
More information about the webkit-unassigned
mailing list