Bug 287549
Summary: | REGRESSION (Safari 18.2): CSS rem font-size in clamp not working when page is zoomed | ||
---|---|---|---|
Product: | WebKit | Reporter: | sandra.k.lindberg |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Major | CC: | andresg_22, bfulgham, karlcow, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 18 | ||
Hardware: | Mac (Apple Silicon) | ||
OS: | macOS 15 | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=212522 |
sandra.k.lindberg
There’s an accessibility issue in Safari 18.2, it’s still present in Safari 18.3 but it was not present in Safari 18.1 and earlier (17.3).
When font-size is set with clamp in CSS, e.g. font-size: clamp(10px, 1rem, 24px) the text becomes smaller as the user zooms the page. Increased percentage of zoom makes the font-size decrease more (text in 175% zoom i smaller than in 125% zoom).
If font-size is changed to font-size: 1rem, without clamp, the rem unit works as expected, even when page is zoomed.
At 100% zoom, Safari seems to be able to understand rem inside clamp.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/144676340>
Simon Fraser (smfr)
Is this https://bugs.webkit.org/show_bug.cgi?id=285914 ?
sandra.k.lindberg
The difference is that I encountered the bug with `clamp` and not `calc`, but I can reproduce the calc issue and it behaves the same way as the clamp issue. So if `tryMakeCanonical` applies to clamp in the same way as it does for calc, then this is probably already solved. However, as there are no tests for `clamp(...)` in https://commits.webkit.org/289030@main so I'm not 100% sure.