Closed Bug 1350853 Opened 9 years ago Closed 9 years ago

stylo: Stylo serializes all angle specified values a radians

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: emilio, Unassigned)

References

Details

Chrome and Gecko preserve the unit. We should probably do the same.
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>
It might be that https://drafts.csswg.org/css-values/#compat means we should serialize as degrees.
Priority: -- → P3
Priority: P3 → --
Priority: -- → P3
What is offsetRotation actually? It seems to me that both Gecko and Blink returns undefined for getComputedStyle(el).offsetRotation.
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: 9 years ago
Resolution: --- → WORKSFORME
(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.