Bug 290024

Summary: Adding max-width and max-height:100% breaks aspect-ratio
Product: WebKit Reporter: ash
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 18   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=246303
Attachments:
Description Flags
minimal reproduction none

ash
Reported 2025-03-18 20:42:44 PDT
Created attachment 474623 [details] minimal reproduction While attempting to constrain an aspect-ratio div inside another relative div, I set max-width:100% and max-height:100%. Expected: In other browsers this doesn't allow the ratio box to get larger than the container. Actual: In Safari the aspect ratio is not preserved Example: https://codepen.io/AshKyd/pen/jEOzbbj
Attachments
minimal reproduction (710 bytes, text/html)
2025-03-18 20:42 PDT, ash
no flags
Radar WebKit Bug Importer
Comment 1 2025-03-25 20:43:12 PDT
Note You need to log in before you can comment on or make changes to this bug.