border-radius shapes component tone from sharp utility panels to soft cards and pills.
Practical guidance
- Use consistent radius scale tokens.
- Match radius across container and nested media when needed.
- Avoid arbitrary values that break visual rhythm.
Important interview questions and answers
- Q: Why define radius tokens?
A: Keeps component family visually consistent and easier to refactor. - Q: How create circle avatar?
A: Equal width/height withborder-radius: 50%. - Q: Common border-radius bug with images?
A: Image not clipped because parent needsoverflow: hiddenin some layouts.
Practice: Change one property in the playground and observe cascade + layout in DevTools.