News for hackers. Stuff that matters.
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by sam_goody on Friday March 04, 2022 @04:44AM (#30552576)
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?

Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by FinalBriefing on Friday March 04, 2022 @08:23AM (#30554333)
There are a number of things that PurgeCSS can't safely remove, so this tool looks like it is intended for code review.
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by zhcalvin on Saturday March 12, 2022 @12:23AM (#30649180)
Exactly. CSS-Checker is to check and show the similar classes for programmers to read
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by brianzelip on Friday March 04, 2022 @05:04AM (#30552697)
> 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.

Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by zhcalvin on Saturday March 12, 2022 @12:34AM (#30649224)
Thanks for mentioning, css-checker is more lightweight and intended to be used as a command-line tool.
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by mouzogu on Friday March 04, 2022 @01:53AM (#30551490)
these type of tools always end up biting you in the ass
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by jamapy on Friday March 04, 2022 @02:27AM (#30551716)
Why? Any example? This tool just tell, not changing anything.
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by mouzogu on Friday March 04, 2022 @03:24AM (#30552074)
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.

Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by onion2k on Friday March 04, 2022 @03:30AM (#30552117)
I use https://www.projectwallace.com/ to check CSS quality. It does a lot more than just checking for similar declarations.
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by zagrebian on Friday March 04, 2022 @05:20AM (#30552814)
Since when is CSS a “script”?
Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by samatman on Friday March 04, 2022 @08:33AM (#30554462)
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.

Re:CSS-Checker: Find and Reduce Similar and Duplicated CSS S... by brianzelip on Friday March 04, 2022 @05:22AM (#30552824)
ie: files