The priority of a selector can be expressed as a list of 4 digits: 0,0,0,0
.
Starting from the right:
- the first digit is the number of elements and pseudo-elements in the selector.
- The second is the number of classes, attributes and pseudo-classes.
- The third is the number of ID elements.
- The last one if there is inline style property.
As an example: