I’m just trying to port over some canvas ui to the new ui toolkit system. Is there a way to rotate text? Since this is all ccs-like I want to exactly as show here Text Rotation | CSS-Tricks
I looked at the documentation and there doesn’t appear to be anything similar to transform-origin, transform: rotate()
We don’t yet support the transform properties from CSS in our USS. It’s on the roadmap. For now, the only way to rotate is to use C#. All VisualElements have a transform property that you can edit directly. Note that this is applied after all layouting has been computed so it will not affect layouting in any way (like, won’t change the size of the parent element when you rotate your text)
Thanks for the reply Damian! That’s what I figured! I’m happy to wait. I was just testing how quickly I can port our current canvas ui to toolkit, and that was one of the roadblocks. Otherwise porting was extremely quick!
Also: .transform doesn’t appear to work (at least in 2019 LTS): creating a row with three elements, then rotating it 90 degrees, causes each child element to rotate, and then layout on top of each other. This is hopeless - as a developer I now have to write an entire layout engine to plug the gap in … the layout engine .
Hopefully there’s something else that works, will keep looking.