Explain CSS specificity and selector precedence
Company: Gofundme
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: easy
Interview Round: Technical Screen
## Question
Explain **CSS specificity** and how the browser decides which style rule wins when multiple selectors match the same element.
Include:
- How specificity is calculated (e.g., tag vs class vs id)
- How pseudo-classes like `:hover` affect specificity
- What happens when specificity ties
- Where `!important` and inline styles fit in
Quick Answer: This question evaluates a candidate's understanding of CSS specificity and selector precedence, focusing on how the browser prioritizes competing style rules in the cascade.