zmoazeni / csscss

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

Smarter handling of CSS shortcodes #74

Open somerandomdude opened 11 years ago

somerandomdude commented 11 years ago

I'm using a lot of CSS shortcodes and it doesn't seem right that something like:

margin: 15px 0; and margin:30px 0; would be seen as having duplicates for margin-left and margin-right.

Thoughts?

zmoazeni commented 11 years ago

There's an option you can use to turn that off. --no-match-shorthand

I'm probably going to drop that feature in v2.

On Sunday, June 2, 2013, P.J. Onori wrote:

I'm using a lot of CSS shortcodes and it doesn't seem right that something like:

margin: 15px 0; and margin:30px 0; would be seen as having duplicates for margin-left and margin-right.

Thoughts?

— Reply to this email directly or view it on GitHubhttps://github.com/zmoazeni/csscss/issues/74 .

-Zach

somerandomdude commented 11 years ago

Cool! Did I just miss this somewhere in the documentation or issue log? Apologies if so.

zmoazeni commented 11 years ago

It's in --help, but not really anywhere else

On Sunday, June 2, 2013, P.J. Onori wrote:

Cool! Did I just miss this somewhere in the documentation or issue log? Apologies if so.

— Reply to this email directly or view it on GitHubhttps://github.com/zmoazeni/csscss/issues/74#issuecomment-18814988 .

-Zach

zmoazeni commented 11 years ago

I'm probably going to drop that feature in v2.

I mean the shorthand matching altogether. Not the flag to disable it.

robme commented 10 years ago

So has this been dropped? With --match-shorthand and --no-match-shorthand I can't get it to tell me that:

border-top: solid 1px #999; and border-top: 1px solid #999;

are the same.

zmoazeni commented 10 years ago

@robme Ah that's a bug. csscss shouldn't care about the order but I believe it does.

For future reference: http://stackoverflow.com/a/4077517

robme commented 10 years ago

Thanks for the link. I usually always use "width style color" but the code I'm trying to refactor doesn't.