zmoazeni / csscss

A CSS redundancy analyzer that analyzes redundancy.
http://zmoazeni.github.io/csscss/
MIT License
2.92k stars 151 forks source link

Multiple Rulesets with exact same Selector #94

Open aunueget opened 9 years ago

aunueget commented 9 years ago

@zmoazeni Thanks for the great tool Is there anything that does this? If not I would be interested contributing this.

Example css file:

.pizza{
    font-size: 16px;
    color: #ff0000;
    display: none;
}

.pizza {
    overflow: auto;
    padding: 1em;
}

If i run csscss on the above file i would like to get something like:

2 rule sets with same selector ".pizza"  at Lines: 1 , 7
zmoazeni commented 9 years ago

Sounds a bit like https://github.com/zmoazeni/csscss/issues/93 - I'd welcome a PR!

I'm also curious about the line mapping too. That'd be pretty nice.