Count number of selectors in a css file

前端 未结 7 686
予麋鹿
予麋鹿 2020-12-12 15:12

is there an existing plugin/app/program/script/whatever that analyzes and counts the css selectors of a file? i want to check if the reason my css file is not working in IE

7条回答
  •  清歌不尽
    2020-12-12 15:53

    Simple algorithm for counting the selectors if you want to do it as part of the build process or simply don't want to do it in JS:

    Replace the texts between "{" and "}" with a "," and then calculate the number of ",". This will give you the number of selectors on the file.

提交回复
热议问题