Amelia Wattenberger is at it again with this nice interactive page on the CSS Cascade
Every time we write a CSS declaration (or rule), it will enter the CSS Cascade, which will determine whether or not it will end up as the final style. The further down the cascade a declaration falls, the less likely it will end up as the final style.
Time to get your specificity mojo on! But don’t be fooled, there’s more to only element/class/id differences …