Closed
Bug 1820414
Opened 2 years ago
Closed 2 years ago
Preserve units in angle calculations
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
firefox112 | --- | affected |
People
(Reporter: canadahonk, Unassigned)
References
Details
Currently, we do not preserve the unit (deg/rad/etc) when doing any angle calculations, it is just set as degrees.
WPT test: https://wpt.fyi/results/css/css-values/calc-infinity-nan-serialize-angle.html
Example from test (uses NaN but: rotate(calc(1rad * NaN))
-> rotate(calc(NaN * 1rad))
(1rad
preserved, not 1deg
)
(There are no dedicated WPT tests for this, maybe some should be added?)
Reporter | ||
Comment 1•2 years ago
•
|
||
Filed an issue to WPT upstream to discuss: https://github.com/web-platform-tests/wpt/issues/38821
Reporter | ||
Updated•2 years ago
|
Summary: Angle scalar multiplication should inherit unit → Preserve units in angle calculations
Reporter | ||
Comment 2•2 years ago
|
||
Changed to be more general as we do not preserve units anywhere in angle calculations afaik.
Updated•2 years ago
|
Severity: -- → S3
Reporter | ||
Comment 3•2 years ago
|
||
We should always serialize and compute angle calcs as canonical unit (deg) anyway, so this behavior is unneeded.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•