Hacker News new | past | comments | ask | show | jobs | submit login
CSS-Checker: Find and Reduce Similar and Duplicated CSS Scripts (github.com/ruilisi)
41 points by zhcalvin on March 4, 2022 | hide | past | favorite | 12 comments



If I understand this correctly, it is similar to Parcel's bundler/minifier: https://css-tricks.com/parcel-css/

Except that Parcel is a parser, deduper, transformer [autoprefixer, future-CSS-to-current-convertor] and minifier.

And that, in turn, is based on CSSNano [although it is a complete rewrite in Rust], IIRC.

Can someone confirm that I understand correctly, and if so, how does this compare to Parcel? To CSSNano or PurgeCSS?


There are a number of things that PurgeCSS can't safely remove, so this tool looks like it is intended for code review.


Exactly. CSS-Checker is to check and show the similar classes for programmers to read


> It is designed to avoid redundant or similar css between files

See also CSS Stats, https://cssstats.com/, and atomic/functional/utility CSS libraries more generally which are designed exactly to eliminate as much redundant CSS as possible.


Thanks for mentioning, css-checker is more lightweight and intended to be used as a command-line tool.


these type of tools always end up biting you in the ass


Why? Any example? This tool just tell, not changing anything.


I mean, when you start deleting css because you think it's redundant.

Not a comment on the tool itself, just the nature of css and it's emergent complexity. It's very difficult to refactor large css codebase, especially in an automated or part-automated fashion.


I use https://www.projectwallace.com/ to check CSS quality. It does a lot more than just checking for similar declarations.


Since when is CSS a “script”?


I would refer to other declarative constraint languages as scripts.

Something doesn't have to be Turing complete to be a recipe for a computation.


ie: files




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: