Live data from Hacker News

Csscss: a CSS redundancy analyzer that analyzes redundancy

zmoazeni.github.io

21–30 of 46 posts

Re: Csscss: a CSS redundancy analyzer that analyzes redundancy

#23
post #22

This could be an interesting companion to Helium. Helium-css can be used on live sites to find unused CSS. Combine with this project to remove duplicates too. https://github.com/geuis/helium-css

This may be the single most helpful comment I've found on Hacker News. I've been looking for a tool like Helium for a while. Thank you!

Re: Csscss: a CSS redundancy analyzer that analyzes redundancy

#24
post #17

Earlier quoted context omitted.

I prefer Select2 over Chosen http://ivaynberg.github.io/select2/

I'm using Select2 on my site http://gitignore.io/ and it's been awesome so far.

Just a side note, it took me a few tries to hit "OSX." My first two tries were "OS X" and "Mac OS X", before I noticed something was coming up and disappearing when I typed the "OS X"

Re: Csscss: a CSS redundancy analyzer that analyzes redundancy

#25
It seems like when run on SCSS mode, it expands mixins before running the redundancy check. For instance, two of my selectors both include three of the same mixins, which end up expanding into 23 rules, and CSSCSS reports 25 shared rules between them. (Further inspection confirms that exactly 2 normal rules are shared.)

I would think that using mixins should also count as having eliminated redundancy. A simple solution would be to ignore them, or more ideally the redundancy check could treat mixins just as a normal rule, so that it could detect using the same set of mixins in multiple places as redundancy.

Re: Csscss: a CSS redundancy analyzer that analyzes redundancy

#26
post #25

It seems like when run on SCSS mode, it expands mixins before running the redundancy check. For instance, two of my selectors both include three of the same mixins, which end up expanding into 23 rules, and CSSCSS reports 25 shared rules between them. (Further inspection confirms that exactly 2 normal rules are shared.) I would think that using mixins should also count as having eliminated redundancy. A simple soluti…

This has come up a couple times. I wouldn't mind this topic moving it to github so the conversation doesn't get lost. And others can contribute to it long after this gets buried on HN.

My initial opinion is that even though your SCSS code is consolidated, the resulting CSS code is still duplicated all over the place. To me, that is a code smell. Particularly when I need to debug from the web developer tools.

Re: Csscss: a CSS redundancy analyzer that analyzes redundancy

#27

Earlier quoted context omitted.

Why? I haven't used either yet so it'd be interesting to hear your reasoning.

IE7 support, better AJAX support and a ton more options.

Also, Chosen only works with the tags, which can be quite annoying. And to me, the Select2 community seems a lot more active and able to participate in the project.

Re: Csscss: a CSS redundancy analyzer that analyzes redundancy

#29
post #25

It seems like when run on SCSS mode, it expands mixins before running the redundancy check. For instance, two of my selectors both include three of the same mixins, which end up expanding into 23 rules, and CSSCSS reports 25 shared rules between them. (Further inspection confirms that exactly 2 normal rules are shared.) I would think that using mixins should also count as having eliminated redundancy. A simple soluti…

This has come up a couple times. I wouldn't mind this topic moving it to github so the conversation doesn't get lost. And others can contribute to it long after this gets buried on HN. My initial opinion is that even though your SCSS code is consolidated, the resulting CSS code is still duplicated all over the place. To me, that is a code smell. Particularly when I need to debug from the web developer tools.

Good idea, posted my reply: https://github.com/zmoazeni/csscss/issues/25
Post reply on HN