One more question: this works for the css mode, but not htmlmixed. Does the mixed mode need to be extended differently, since it already extends other modes?
The htmlmixed mode by default uses the plain CSS mode. You could either mutate that (by adding properties to CodeMirror.resolveMode("css").propertyKeywords), since it seems like configuring it to not use the CSS mode for <style> tags is currently hard.