CM6 base theme override

A small style-mod question:

According to the docs at https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme we can create an extension of the base theme using the style-mod spec syntax.

There doesn’t seem to be a way to overwrite/change things that’s already been set by the base theme, and the only way to override it is through CSS rule (which identical/higher specificity).

For example, I’m trying to replace the 4 different selectionBackground colors with a single CSS rule.

I don’t suppose there’s a better way to do so without specifying it 4 times?

"$$light $selectionBackground": {
	background: 'var(--text-selection)'
},
"$$dark $selectionBackground": {
	background: 'var(--text-selection)'
},
'$$focused$light $selectionBackground': {
	background: 'var(--text-selection)'
},
'$$focused$dark $selectionBackground': {
	background: 'var(--text-selection)'
},

Yes, the idea is that base themes provide a default styling for things, and regular themes can further customize that (your use case sounds like it could be a regular theme). So indeed, when an element is targeted in multiple ways you have to override all of them, just like you would in regular CSS.

Ok, good to know, thanks!