WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 251419
252425
Parent’s padding affects the width of a positioned image with max-height: 100%
https://bugs.webkit.org/show_bug.cgi?id=252425
Summary
Parent’s padding affects the width of a positioned image with max-height: 100%
Vadim Makeev
Reported
2023-02-16 13:51:07 PST
Created
attachment 465032
[details]
max-height demo Or maybe something else is happening, but look at the demo: the square should be fully green.
https://codepen.io/pepelsbey/pen/JjadGQv
div { position: relative; width: 256px; height: 256px; background-color: red; padding-top: 255px; box-sizing: border-box; } img { position: absolute; top: 0; left: 0; max-height: 100%; background-color: green; } The same demo is attached to the issue as an HTML file. It’s not purely theoretical: my presentation engine got affected. I use the class "cover" to position images. Now they’re distorted only in Safari.
https://shwr.me/
— see slides with images. They should not have white padding on the sides. It’s definitely a regression. It used to work fine for many years.
Attachments
max-height demo
(842 bytes, text/html)
2023-02-16 13:51 PST
,
Vadim Makeev
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2023-02-16 20:43:28 PST
Thank you filing this bug report. It looks like
https://codepen.io/pepelsbey/pen/JjadGQv
has progressed at
259663@main
.
zalan
Comment 2
2023-02-16 20:43:58 PST
let me check
https://shwr.me/
too
zalan
Comment 3
2023-02-16 20:46:31 PST
yup,
https://shwr.me
is no longer broken. Thanks again!
zalan
Comment 4
2023-02-16 20:47:19 PST
*** This bug has been marked as a duplicate of
bug 251419
***
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