Data selector for themes

In this very specific case, you might be able to use our SCSS helpers. Here’s an example from core, but the same should work in a theme:

You can also use @is-dark-color-scheme

That way, your component is not dependent on theme-ids, which will change if you installed the theme on another site.