2.3 Ranking CSS Specificity
In this lesson, you’ll learn how to create a ranking system for CSS specificity. This will help you write better CSS and, when you’re dealing with conflicting styles, it will help you determine where the problem is.
To do this, we’ll be using a weight system where we’ll assign a weight value to each selector type in the hierarchy, and we’ll base our system on the official specification described on W3.org. Let’s begin.