Math function 'calc()' should allow infinity and NaN
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: seokho, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Expected results:
According to the new CSS specification [1], CSS calc() math function should allow infinity and NaN values by 'infinity', '-infinity', 'NaN' keywords or expressions that could be evaluated into infinity or NaN such as 'calc(1/0)'.
[1] https://drafts.csswg.org/css-values-4/#calc-type-checking
Reporter | ||
Comment 1•4 years ago
|
||
And perhaps this issue related in https://bugzilla.mozilla.org/show_bug.cgi?id=css-values-4
Comment 2•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Fix some tests to:
- Not assume
double
precision. - Account for recent working group resolution with regards to NaN: https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1111211295
Not sure I caught all, but normalizing to 0 was already our existing
behavior. This feature needs more work before it can be enabled more
generally, so make it nightly-only, for now.
Also, it's unclear per spec what the serialization for infinity*1s or so
should be. Right now we serialize to <very-big-number>s, which seems
reasonable, but some tests (but not others!) expect different behavior.
I left those untouched for now.
Updated•2 years ago
|
Comment 8•2 years ago
•
|
||
Backed out 5 changesets (Bug 1682444, Bug 1774589) for causing wpt failures on acos-asin-atan-atan2-serialize.html.
Backout link
Push with failures --> 1st push <--> push with fix
Failure Log wpt6 1st push <--> wpt6 push with fix
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Comment 11•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Comment 13•2 years ago
|
||
We are tracking the docs additions for this along with related CSS trig functions docs in https://github.com/mdn/content/issues/19832
Updated•2 years ago
|
Description
•