WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
295629
Item with aspect-ratio ignores padding when rendering its content
https://bugs.webkit.org/show_bug.cgi?id=295629
Summary
Item with aspect-ratio ignores padding when rendering its content
shuang
Reported
2025-07-09 02:54:52 PDT
Created
attachment 475824
[details]
padding collapses in safari If you apply an aspect-ratio on a layer with a padding set, the layer would render its content ignoring the padding. Example code sandbox:
https://codesandbox.io/p/sandbox/vfvnk4
The content here has a 200px height, and the box has width: 200px & height: auto, with a 20px padding. When setting aspect ratio of the box to 1, I expect the box to be 240x240 (what you would see in Chrome, for example), instead of 240 x 200 (see attached screenshot).
Attachments
padding collapses in safari
(266.43 KB, image/png)
2025-07-09 02:54 PDT
,
shuang
no flags
Details
Safari vs Chrome vs Firefox - Reference Screenshot
(719.29 KB, image/png)
2025-07-17 17:52 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-07-10 19:10:35 PDT
<
rdar://problem/155579810
>
Ahmad Saleem
Comment 2
2025-07-17 17:52:51 PDT
Created
attachment 476083
[details]
Safari vs Chrome vs Firefox - Reference Screenshot
Alexsander Borges Damaceno
Comment 3
2025-08-17 19:39:41 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/49514
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug