box-sizing controls how width/height are calculated. Advanced teams standardize on border-box.
Why border-box at scale
- More intuitive component sizing.
- Fewer overflow surprises with padding/borders.
- Simpler layout mental model across teams.
Important interview questions and answers
- Q: What does border-box change?
A: Declared dimensions include content + padding + border. - Q: Should box-sizing be global reset?
A: Common best practice for predictable sizing systems. - Q: Content-box still useful?
A: Occasionally for niche scenarios, but less common in app UI.
Practice: Change one property in the playground and observe cascade + layout in DevTools.