Bug 259812 - min/max expressions are ignored in sizes attribute
Summary: min/max expressions are ignored in sizes attribute
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 16
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-08-03 18:57 PDT by mic.gallego
Modified: 2024-05-30 18:14 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mic.gallego 2023-08-03 18:57:57 PDT
Hi,

"min" or "max" expressions are completely ignored by sizes in Safari, while they are properly honored in both Chrome and Firefox. We had a few min() based calculation, which caused Safari desktop to only pickup the biggest size. You can find a minimal reproduction case here: https://codepen.io/bakura10/pen/PodgbzN

Chrome and Firefox both show the low-resolution image due to the min clause, while Safari ignores it and uses the bigger image.

Thanks!
Comment 1 Ahmad Saleem 2023-08-04 04:35:32 PDT
I am able to reproduce using attached test case on STP175 where Safari show '1000*400' while both Chrome Canary 117 and Firefox Nightly 118 show 200*100.
Comment 2 Radar WebKit Bug Importer 2023-08-10 18:58:12 PDT
<rdar://problem/113726495>