CSSDocument is 1:1 with Document. @njx is right that this will break when there are more than once CSSDocuments open. I'll fix.