Re:Optimize CSS with SAT Solving
by spencerchubb on Sunday March 17, 2024 @02:55PM
(#39736959)
I would like a tool similar to this, but for refactoring in a human-readable way instead of minifying. Some tool to automatically look for duplicated css code. In theory, it seems easier for css than for actual programming languages given the simplicity
[ Parent
| on HN ]
Last time I was leaving front end there were rumors of css coverage tools. That would certainly be a start.
It's a thing in Chrome Dev Tools now: https://developer.chrome.com/docs/devtools/coverage/
now, if only it could persist the data while navigating to other pages, it would be a lot more useful
This I remember now. So that still hasn’t been sorted out? Pity.
Re:Optimize CSS with SAT Solving
by hirako2000 on Monday March 18, 2024 @10:19AM
(#39744911)
and also automate all possible interaction for styles applied only in certain condition for that page?
Re:Optimize CSS with SAT Solving
by ToValueFunfetti on Sunday March 17, 2024 @03:29PM
(#39737240)
CSS is Turing complete, although you could probably handle 99.9% of real world cases without dealing with that.
Re:Optimize CSS with SAT Solving
by keepamovin on Sunday March 17, 2024 @09:46PM
(#39739802)
This sort of does that I think, but it more just dedupes it rather than just identifying the duplicates. But I agree that like some tooling to make CSS more human readable, and like to tame unwieldy enlarged CSS and subdue it to the useful and the good and the organized that would be a very useful thing, but I couldn’t find anything… besides this haha! :)
Yeah, in a related anecdote it’s surprising how sparse the landscape of CSS tools seemed at least for command line tools that I was looking for.
I didn’t want an ID plug-in because I didn’t really use anything except for vim and I don’t really use plug-ins for that.
That might be kind of a niche set up but when I went looking for like even just something to sort the properties by some standard order within each rule, I couldn’t find anything current that worked in my searching anyway.