WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
278714
round() does not work without <rounding-strategy> or roundingInterval
https://bugs.webkit.org/show_bug.cgi?id=278714
Summary
round() does not work without <rounding-strategy> or roundingInterval
Philipp
Reported
2024-08-27 04:06:29 PDT
In Safari (Version 17.6 (19618.3.11.11.5)), `round()` seems to require both the rounding strategy and rounding interval parameters but both are optional according to the spec:
> If <rounding-strategy> is omitted, it defaults to nearest. (Aka rounding to the nearest integer.) If the type of A matches <number>, then B may be omitted, and defaults to 1; omitting B is otherwise invalid.
Source:
https://drafts.csswg.org/css-values/#funcdef-round
Reproduction:
https://codepen.io/kleinfreund/pen/ExBRdMO
Workaround: Add the default values as appropriate. The Safari dev tools show a warning icon with the label "Unsupported property value" for the two property declarations marked "fail" in the reproduction.
Attachments
WebKit ToT vs Chrome Canary 130 vs Firefox Nightly 132
(439.75 KB, image/png)
2024-09-03 06:30 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-09-03 04:07:13 PDT
<
rdar://problem/135182966
>
Ahmad Saleem
Comment 2
2024-09-03 06:28:03 PDT
It is fixed on WebKit ToT, tested on
283089@main
. It matches both Chrome Canary 130 and Firefox Nightly 131. Don't know which exact revision fixed it but it might be from Sam's work. (CCed him).
Ahmad Saleem
Comment 3
2024-09-03 06:30:46 PDT
Created
attachment 472416
[details]
WebKit ToT vs Chrome Canary 130 vs Firefox Nightly 132
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