!important elevates a declaration above normal specificity rules, but overuse creates maintainability debt.
When it can be justified
- Utility escape hatches in controlled design systems.
- Overriding third-party inline styles when no better hook exists.
- Accessibility user styles where priority is intentional.
Pitfall
Using !important as default hides architecture issues and triggers override wars.
Important interview questions and answers
- Q: Is
!importantalways bad?
A: Not always, but it should be rare, intentional, and documented. - Q: Better first step before using it?
A: Refactor selector architecture and source order. - Q: Where is
!importantespecially risky?
A: Large shared codebases with many contributors and third-party styles.
Pitfall: Check cascade order—author stylesheet loses to inline styles and !important surprises.