CSS specificity calculator for Sublime Text 2
- Total 4K
- Win 2K
- OS X 1K
- Linux 476
|Apr 20||Apr 19||Apr 18||Apr 17||Apr 16||Apr 15||Apr 14||Apr 13||Apr 12||Apr 11||Apr 10||Apr 9||Apr 8||Apr 7||Apr 6||Apr 5||Apr 4||Apr 3||Apr 2||Apr 1||Mar 31||Mar 30||Mar 29||Mar 28||Mar 27||Mar 26||Mar 25||Mar 24||Mar 23||Mar 22||Mar 21||Mar 20||Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7|
Use Package Control to install “sublime-csspecific”.
Alternate instructions (not recommended): Clone the repository into your Sublime Text packages folder:
git clone https://github.com/spadgos/sublime-csspecific CSSpecific
Don't forget to watch for updates!
Open a file containing CSS (this can include HTML files!), and then activate CSSpecific by hitting the hotkey (default:
Alt+Ctrl+Shift+C), or using the Command Palette.
If you have nothing selected, then all CSS selectors in the file will be evaluated. If you have one or more non-empty selections, then only the selectors which intersect with your selections will be shown.
Actual CSS specificity is not calculated as a single number. For simplicity, the real values are converted to a single number (basically, id = 100, class = 10, tag = 1), which is fine in most circumstances, but will break if you have more than 10 classes or tags referenced in a single selector. If this is the case for you, you have bigger problems to deal with first.
If you find a bug in the calculations, send me a pull request or report an issue in the tracker. Feature requests welcome, too.