Optimize CSS with SAT Solving

SatCSS allows for the minimization of CSS files while preserving semantics. It can refactor CSS code to combine selectors that have the same properties, but cannot combine selectors that affect different elements. The tool can also be used to test if two selectors may match the same node in a DOM. SatCSS creates an abstract representation of a CSS file as a set of pairs (selector, declaration) with a specific ordering. It has requirements like Python 3.7, cssselect, docopt, lxml, tinycss2, toposort, and z3-solver. Users can run SatCSS with Poetry or without it using provided scripts. The tool is recommended for use with Z3 SMT solver.

https://github.com/matthewhague/sat-css-tool

To top