LeaVerou / css-almanac

Repo for planning & voting on which stats to study
https://projects.verou.me/mavoice/?repo=leaverou/css-almanac&labels=proposed%20stat
34 stars 3 forks source link

How much are specificity hacks used? #27

Open LeaVerou opened 4 years ago

LeaVerou commented 4 years ago

By specificity hacks I mean selector rewritings or additions with the sole purpose of increasing or decreasing specificity. Things like:

I suppose BEM could also be considered a specificity hack.

bradkemper commented 4 years ago

Also, html or html body at the beginning of a selector, to just bump it up a little.

LeaVerou commented 4 years ago

Algorithm:

Walk selectors, and count: