WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
263711
round(), mod(), and rem() do not work when there is a percentage for only one value
https://bugs.webkit.org/show_bug.cgi?id=263711
Summary
round(), mod(), and rem() do not work when there is a percentage for only one...
Roman Komarov
Reported
2023-10-26 00:38:16 PDT
Created
attachment 468349
[details]
CodePen with the bug reproduced I noticed a bug in Safari (regular and TP) in how it handles mixed units for round(), mod() and rem() that include a %, but only when it does include it for one value (only A or B, not both as in the above tests). First reduced in this CodePen:
https://codepen.io/kizu/pen/BaMaYwE?editors=1100
(all elements should have the same width with the green part visible on the right), decided to submit it as my first WPT test:
https://github.com/web-platform-tests/wpt/pull/42676
(merged) Can be seen as failing here:
https://wpt.fyi/results/css/css-values/round-mod-rem-computed.html?label=experimental&label=master&aligned&q=css%2Fcss-values%2Fround-mod-rem-computed.html
Current workaround: add 0% to the other part so both contain px and %. Adding the saved CodePen html as an attachment as well.
Attachments
CodePen with the bug reproduced
(1.34 KB, text/html)
2023-10-26 00:38 PDT
,
Roman Komarov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-10-26 15:42:28 PDT
<
rdar://problem/117554926
>
Sam Weinig
Comment 2
2024-08-31 08:20:43 PDT
This is fixed in ToT (was fixed as part of the calc() re-write -
https://bugs.webkit.org/show_bug.cgi?id=278244
)
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