[css-transforms-1] How precise can we be about serialization?
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
So as part of some tests I'm writing, I'm using transform: rotate(90deg); and testing the serialization. As specified, at computed/used time this becomes a matrix(); no problem.
However! In Firefox, a 90deg rotation like that produces the nice, simple serialization of matrix(0, 1, -1, 0, 0, 0). In Chrome, it instead gives matrix(6.12323e-17, 1, -1, 6.12323e-17, 0, 0), aka two of the zeros are instead incredibly small non-zero values.
These two matrixes don't produce a rendering difference, but it sure makes it difficult to test serialization. How precisely do we want to specify this kind of thing? How do browsers test their own serialization in the face of issues like this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reading the CSS Transforms 1 serialization rules and the reported Firefox and Chrome outputs, then determine whether the specification should define precision or canonicalize near-zero matrix values. Done means a clear specification decision and corresponding guidance for serialization tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100