Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SCSS/Sass Compass: How to locate duplicate selectors

I just inherited a nice little project where the CSS was split in multiple small CSS files because of IFrames.

So now that I'm linking everything together and putting it in SCSS, I find myself with tons duplicate selectors with exactly the same styling in them.

I'm guessing there is a nice little option in compass SCSS to have it "suggest" duplication of tags

Can anybody point me in the right direction?

Cheers,
Jason

like image 597
Jason Rogers Avatar asked Dec 03 '25 15:12

Jason Rogers


1 Answers

I had this same problem a while back and the end result was a quick Sasslint tool I wrote to parse .sass files and output the line numbers of each duplicate selector: https://github.com/dfltr/Sasslint

I haven't updated it to explicitly support SCSS, nor do I know if any modifications are even needed to do so, but it might be a good starting point for you.

like image 195
Micah Snyder Avatar answered Dec 06 '25 05:12

Micah Snyder