#818·satori

`transform: rotate()` throws for `turn` and `grad` units

Author: RaphaelFakhriCreated Sep 29, 2026Updated Sep 29, 2026

Description

rotate(), skewX() and skewY() accept only deg and rad. Using turn or grad, which are valid CSS angle units, throws.

Reproduction

javascript
await satori(
  <div style={{ width: 10, height: 10, backgroundColor: 'red', transform: 'rotate(0.5turn)' }} />,
  { width: 100, height: 100, fonts }
)

Actual behavior

Error: Failed to parse declaration "transform: rotate(0.5turn)"

rotate(100grad) fails the same way.

Expected behavior

The units are converted to degrees and the element renders rotated, as it does with rotate(180deg).