get text from: https://searchfox.org/mozilla-central/search?q=%5C%23.*%28%5C%7B%7C%28%2C%5Cn%29%29&path=devtools%2F**%2F*.css&case=false®exp=true
js: [...new Set([...str.matchAll(/\#([^ .:({\[]+).*(?:\{|(?:,\n))/g)].map(([_, id]) => id))].sort().join("\n")
then run following bash script
#!/bin/bash