The highest weighted attribute that the cascade checks is a combination of the importance and the origin of a given rule.
As far as the origin of a CSS rule goes, there are three places that a rule can come from.
The importance of a CSS declaration is determined by the appropriately-named
... read the whole story at blog.logrocket.com.
!important syntax. Adding
!important to a CSS rule automatically jumps it to the front of the cascade algorithm, which is why it’s often discouraged. Overriding styles that use
!important can only be done with other rules that use
!important, which over time can make your CSS more brittle. Many people (myself included) recommend that you only use