CSS specificity

CSS specificity is the algorithm browsers use to decide which style rule wins when several selectors target the same element. It gives each selector a weight based on its type—inline styles, IDs, classes, attributes and elements—and the rule with the highest weight is applied. It is not a system for organising stylesheets, but a way to resolve conflicting rules.

Illustration of a LibraFire team member on a video call with a client

How can we assist you?

Contact Us