csscss icon indicating copy to clipboard operation
csscss copied to clipboard

Smarter handling of CSS shortcodes

Open somerandomdude opened this issue 12 years ago • 7 comments

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?

somerandomdude avatar Jun 02 '13 21:06 somerandomdude

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

zmoazeni avatar Jun 02 '13 22:06 zmoazeni

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

somerandomdude avatar Jun 02 '13 22:06 somerandomdude

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 avatar Jun 03 '13 00:06 zmoazeni

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

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

zmoazeni avatar Jun 03 '13 01:06 zmoazeni

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.

robme avatar Mar 18 '14 16:03 robme

@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

zmoazeni avatar Mar 18 '14 19:03 zmoazeni

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

robme avatar Mar 19 '14 12:03 robme