Tag: web development
Top 10 CSS Mistakes Even Advanced Developers Make
Specificity In short, specificity is a *bad* thing. Once upon a time, we all thought we were being all cute and organized by specifying parent tags in front of what we *really* needed to style. The smaller the selector, the faster and less specific it is, making it much easier to overwrite and extend.
1 2 3 4 5 |
/* Woah, broh! */ .grandparent .parent .header p.intro {} /* Better */ .intro {} |