The best way to explain CSS specificity is to start with some examples. CSS specificity can get confusing. Here’s a closer look at how to calculate the actual specificity value to determine which selector takes precedence…
Direct link: Specifics on CSS Specificity