Re: [csswg-drafts] [css-transforms] Smarter interpolation of truncated transform lists

@tabatkins Yes, phrased it wrong. I am just suspicious about
> * adding neutral transform functions where needed.

Where should missing/differing functions be added?

Simple example:
`rotate(720deg)` → `translate(100px, 100px)`
A translate needs to get added to the former and a rotate to the latter transform function list. But in which order? After all the order matters a lot from the visual perspective.
* We could say that we follow the TRS schema proposed for the `translate`, `rotate` and `scale` properties in Level 2. So translate has precedence over rotate which has precedence over scale. This potentially doubles the number of transform functions if they all differ.
* We could provide an algorithm that adds a transform function to the shorter list. Going from left to right: If 2 transform functions between the 2 lists differ, add the neutral pendant at the same spot to the shorter list. We would still need to decide what the precedence is if the transform function lists have the _same number_ of transform functions.

Potentially both algorithms would replace matrix decomposition for the majority of cases.
However, quite often there would be a solution that could have been smarter from a human eye perspective but wasn't used. Sometimes, even the first solution does not give the most pleasant result.

The complex algorithm needs to get implemented in an interoperable way in all UAs as well. Given how long even smaller changes in the spec took, it might be a while and I expect that we will see some additional feedback from UAs after implementing.

-- 
GitHub Notification of comment by dirkschulze
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/927#issuecomment-393762524 using your GitHub account

Received on Friday, 1 June 2018 05:26:38 UTC