Can you style elements without tags?

So, I know I can style certain elements like that:

import {commonmarkLanguage} from '@codemirror/lang-markdown';

export const Custom: MarkdownConfig = {
  defineNodes: [{name: "Custom"}],
  parseInline: [{
    name: "Custom",
    parse(cx, next, pos) {
      if (something) {
        return -1;
      }
      return cx.addElement('Custom', pos,1);
    }
  }]
}

const custom = Tag.define(tags.meta);
syntaxHighlighting(HighlightStyle.define([
  { tag: custom , textDecoration: 'line-through' },
]));

const styles = {
  'Custom': custom ,
};

const flavouredParser = commonmarkLanguage.parser.configure([
  Custom, {props: [styleTags(styles)]}
]);

But I was wondering, can the same be done without tags?