Imagine you have a root (let's say your index webpage). Then you can build a tree of what is used by what. So if you have a CSS classname that is used by C (C being an HTML element, component, whatever) and C is used by B, but B is not used by A (the root) then it's shaken (removed) and "falls" because it's not connected to the root.
Basically remove everything not connected to the root.
Basically remove everything not connected to the root.