paint-brush
Avoid Headaches by Understanding CSS Specificity by@ae-cordova
104 reads

Avoid Headaches by Understanding CSS Specificity

by Angel Cordova2mMarch 1st, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Specificity is a tricky one of the concepts you have to understand in CSS. If there are two or more CSS rules that point to the same element, the browser gives more weight to the one with the most specific selector. The browser will apply the style of the rule using the latter. The one appearing latest in the style-sheet wins in case of conflicting rules. If you have a rule you want to apply, no matter what, there is a keyword to override everything: "You override everything"

Company Mentioned

Mention Thumbnail
featured image - Avoid Headaches by Understanding CSS Specificity
Angel Cordova HackerNoon profile picture
Angel Cordova

Angel Cordova

@ae-cordova

L O A D I N G
. . . comments & more!

About Author

Angel Cordova HackerNoon profile picture
Angel Cordova@ae-cordova

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite