Depth tracking should be done as in https://github.com/projectwallace/css-analyzer/blob/96cf09b91334b1d3303388ac4ec981dace0f3ec8/src/index.ts#L762-L769