Most CSS developers reach for deg or rad when rotating elements, but two lesser-known units can make your code more intuitive and your mental math much simpler. Gradians and turns are the unsung heroes of CSS angles--units that align with how we actually think about rotation and can eliminate the constant conversions that slow down your workflow.
Whether you're building loading spinners, hover effects, or complex animations, understanding when each CSS angle unit shines can transform your approach to rotational design. Our web development team regularly applies these techniques to create polished, performant interfaces that delight users.
The Four CSS Angle Units
CSS supports four angle units, and understanding when each shines can transform how you approach rotations, gradients, and animations.
Degrees (deg)
The familiar unit with 360° in a circle. Everyone understands degrees from geometry class, but they can be awkward for calculations. A 30-degree angle isn't intuitive as "one-third of a right angle" in code--you're left doing mental division or reaching for a calculator.
Radians (rad)
Based on π (pi), radians are essential for trigonometry but counterintuitive for most CSS work. A full circle is 2π radians (approximately 6.2832) rather than a clean whole number. While indispensable for mathematical computations, radians rarely align with how designers think about rotation.
Gradians (grad)
The "metric degree" with 400gradians in a full circle. Created during the French Revolution alongside the metric system, gradians bring decimal simplicity to angle measurement. A quarter-circle (right angle) equals 100grad--a clean, round number.
Turns (turn)
The most intuitive unit: one turn equals one complete rotation around a circle. This simplicity is transformative for CSS animations. When you want an element to spin once, you write rotate(1turn)--the code literally reads like your design intent.
A circle divided into all four CSS angle units for visual comparison
| Degrees | Radians | Gradians | Turns |
|---|---|---|---|
| 0° | 0rad | 0grad | 0turn |
| 30° | 0.52rad | 33.33grad | 0.083turn |
| 45° | 0.79rad | 50grad | 0.125turn |
| 60° | 1.05rad | 66.67grad | 0.167turn |
| 90° | 1.57rad | 100grad | 0.25turn |
| 180° | 3.14rad | 200grad | 0.5turn |
| 270° | 4.71rad | 300grad | 0.75turn |
| 360° | 6.28rad | 400grad | 1turn |
| 720° | 12.57rad | 800grad | 2turn |
Gradians: The Metric Angle
The gradian (sometimes called "gon" or "grade") emerged during the French Revolution alongside the metric system. Frustrated by the arbitrary divisions of traditional angle measurement, mathematicians proposed dividing a circle into 400 equal parts--making each quadrant a clean 100 gradians. This "metric degree" aimed to bring the same decimal simplicity that meters and grams brought to measurement.
In CSS, you use the grad unit. The beauty of gradians lies in how they map to percentages within a quadrant:
- 90° = 100grad -- quarter turn
- 180° = 200grad -- half turn
- 270° = 300grad -- three-quarter turn
- 360° = 400grad -- full turn
When Gradians Shine
Gradians excel when you're working within a single rotation quadrant--something that comes up frequently in UI design. Consider a slider component with rotational effects, or a card that tilts subtly on hover. The gradian unit lets you think in percentages rather than arbitrary degree values.
Need to rotate something 45 degrees? That's 50grad--half of 100, immediately intuitive. The relationship to a right angle becomes clear in the number itself.
1/* Subtle hover tilt using gradians */2.card:hover {3 transform: rotate(25grad);4}5 6/* Precise icon rotation */7.icon-arrow {8 transform: rotate(-50grad);9}10 11/* Diagonal alignment (45°) */12.diagonal-element {13 transform: rotate(50grad);14}Turns: The Animation Game-Changer
If gradians bring decimal simplicity to quadrant work, turns revolutionize how you think about full rotations. The turn unit is elegantly simple: one turn equals one complete rotation. Two turns equals two full rotations. Half a turn is, well, half a rotation.
This simplicity becomes transformative for CSS animations:
- 0.25turn = 90° (quarter rotation)
- 0.5turn = 180° (half rotation)
- 0.75turn = 270° (three-quarter rotation)
- 1turn = 360° (full rotation)
- 2turn = 720° (two full rotations)
- 3turn = 1080° (three full rotations)
Animation Sequences
Animation sequences that involve multiple rotations become dramatically clearer with turns. A loading spinner that rotates twice per cycle? rotate(2turn) makes the intent obvious. A character that somersaults across the screen? Three somersaults means rotate(3turn)--no calculating 1080 degrees in your head.
The turn unit also pairs beautifully with CSS custom properties. For more advanced animation techniques, see our guide on interactive CSS transitions to combine these angle units with smooth easing functions:
--spins: 2;
.loader {
animation: spin 2s linear infinite;
animation-name: spin;
}
@keyframes spin {
from { transform: rotate(0turn); }
to { transform: rotate(var(--spins, 1) * 1turn); }
}
1/* Loading spinner - two rotations per second */2@keyframes spin {3 from { transform: rotate(0turn); }4 to { transform: rotate(1turn); }5}6 7.loader {8 animation: spin 0.5s linear infinite;9}10 11/* Card flip animation */12.card-inner {13 transition: transform 0.6s;14 transform-style: preserve-3d;15}16 17.card.flipped .card-inner {18 transform: rotateY(0.5turn);19}20 21/* Multiple rotation effect */22@keyframes tumble {23 from { transform: rotate(0turn); }24 to { transform: rotate(1.5turn); }25}26 27.character {28 animation: tumble 0.3s ease-out;29}Choosing the Right Unit
The choice between angle units should serve your code's readability and your mental model:
Use degrees when:
- Working with design tools that output degree values
- The angle is a familiar benchmark (90°, 180°, 270°)
- Collaborating with team members more comfortable with degrees
Use radians when:
- Integrating with JavaScript math libraries that use radians
- Performing trigonometric calculations
- Working with physics-based animations
Use gradians when:
- Working within a single quadrant of rotation
- You want percentage-like thinking for precision angles
- Creating subtle tilt or perspective effects
Use turns when:
- Creating rotation animations with any full or partial rotations
- The design specifies rotations in terms of "how many times around"
- You want maximum readability in animation code
A Practical Example: Before and After
Consider a hover effect that rotates an icon 45 degrees clockwise, then returns on mouse leave.
With degrees (traditional approach):
.icon:hover {
transform: rotate(45deg);
}
With gradians (more intuitive):
.icon:hover {
transform: rotate(50grad);
}
The gradian value directly represents "half of a quarter turn"--50 out of 100--making the relationship to a right angle immediately clear.
For a full 360° rotation animation, turns win outright:
@keyframes spin {
from { transform: rotate(0turn); }
to { transform: rotate(1turn); }
}
No one is calculating 360 degrees or memorizing that 2π equals approximately 6.2832 radians. The turn unit expresses rotation in the most natural terms possible.
Browser Compatibility and SVG Limitations
Browser Support
Good news: browser support for both gradians and turns is excellent.
Gradians: Supported since IE9, with full support across Chrome, Firefox, Safari, and Edge.
Turns: Same broad support, though Firefox required version 13 and Safari version 10--still well within the range of all modern browsers.
SVG Limitation
There's one significant limitation: SVG doesn't support gradians or turns. SVG animations require angles in degrees, and the unit specifier is optional (not allowed for SVG angle values). This is a trade-off when working with SVG-based graphics or animations.
For SVG work, stick with degrees. For all other CSS transformations and animations, gradians and turns are fair game.
Conclusion
Gradians and turns won't replace degrees or radians entirely--there are valid reasons to use each unit depending on context. But these "quiet heroes" of CSS angles offer genuine readability improvements for specific use cases:
- Gradians bring metric-system elegance to quadrant work, letting you think in percentages of a right angle
- Turns make rotation animations dramatically more intuitive, with code that reads like your design intent
The next time you're writing a rotation transformation or animation, ask yourself: which unit matches how I actually think about this angle? Your future self (and your code reviewers) will thank you for choosing the unit that makes the code read like your design intent.
Looking to level up your CSS skills? Our web development services team can help you implement these techniques and more for your next project.
Frequently Asked Questions
Sources
- MDN Web Docs - CSS angle - Official CSS specification reference for angle data types
- DEV Community - Gradians and Turns: the quiet heroes of CSS angles - In-depth tutorial with code examples and practical use cases
- Wikipedia - Gradian - Historical context on gradian unit creation