Closed
Bug 1350853
Opened 7 years ago
Closed 7 years ago
stylo: Stylo serializes all angle specified values a radians
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: emilio, Unassigned)
References
Details
Chrome and Gecko preserve the unit. We should probably do the same.
Reporter | ||
Comment 1•7 years ago
|
||
I'm not sure if Gecko keeps it for computed values, but the following test-case seems to indicate that blink normalizes to degrees instead of radians at computed value time: <!doctype html> <div></div> <script> var el = document.querySelector('div'); el.style.offsetRotation = "10deg"; alert(el.style.offsetRotation); alert(getComputedStyle(el).offsetRotation); el.style.offsetRotation = "10rad"; alert(el.style.offsetRotation); alert(getComputedStyle(el).offsetRotation); </script>
Comment 2•7 years ago
|
||
It might be that https://drafts.csswg.org/css-values/#compat means we should serialize as degrees.
Updated•7 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Priority: P3 → --
Updated•7 years ago
|
Priority: -- → P3
Comment 3•7 years ago
|
||
What is offsetRotation actually? It seems to me that both Gecko and Blink returns undefined for getComputedStyle(el).offsetRotation.
Comment 4•7 years ago
|
||
And if I change the code to do
> el.style.transform = "rotate(10deg)";
instead, it would correctly report "rotate(10deg)" for specified value. I suppose this means WFM.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 5•7 years ago
|
||
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #3) > What is offsetRotation actually? It seems to me that both Gecko and Blink > returns undefined for getComputedStyle(el).offsetRotation. Huh, you're right... I'm pretty sure it worked at some point? Shrug. I think you fixed this anyway :)
You need to log in
before you can comment on or make changes to this bug.
Description
•