[Webkit-unassigned] [Bug 252425] New: Parent’s padding affects the width of a positioned image with max-height: 100%

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 16 13:51:07 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=252425

            Bug ID: 252425
           Summary: Parent’s padding affects the width of a positioned
                    image with max-height: 100%
           Product: WebKit
           Version: Safari 16
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: pepelsbey at gmail.com

Created attachment 465032

  --> https://bugs.webkit.org/attachment.cgi?id=465032&action=review

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.

-- 
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/20230216/b54befda/attachment.htm>


More information about the webkit-unassigned mailing list