What is .syntax--meta.syntax--separator?


#1

What kind of elements get the .syntax–meta.syntax–separator class?

It’s pretty hard to google this. Pretty much all the hits are from DeprecationCop. SublimeText’s grammar docs don’t mention meta.separator, just punctuation.separator.

Thanks!


#2

It would be, because even if Google was good for searching Atom packages based on their grammar files, in the grammar that combination is represented as either meta.separator or separator.meta. What you can do is open .atom/packages/ and search for those two strings. Or you can search on GitHub. If you tell us what package or element you’re looking at, we might be able to provide more insight.

And the Sublime documentation is going to give you no useful information about what exists in a language package for Atom. In the case where they align, it may be that they were written by the same person or set of people, but it should be considered purely coincidental.


#3

Yes, of course, I’m aware of that.

No hits :confused:

The specific theme I’m looking at in this case is this one.

They are mentioned as examples of syntax selectors mentioned by DeprecatedCop to be deprecated in Atom v1.13.0, so I assume they’re used for something.

The problem is that the Atom documentation gives even less useful information… SublimeText’s documentation at least has references such as this that list “standard” syntax scopes, and often they line up with Atom’s. The same goes for TextMate.

Atom, however, has no similar information that I’ve been able to find (please let me know if it exists!), which is why I (and many others) have historically resorted to SublimeText/TextMate docs.

That said, I do of course know that they’re not authoritative for Atom, and in any case they don’t list meta.separator anyway.


#4

You’re misinterpreting the error message. In Atom 1.13.0, the DOM organization of Atom was reworked a bit. Previously, it used a shadow DOM to isolate syntax theme styles from the rest of the editor window, but for technical reasons that got changed to a namespacing system where syntax themes use the prefix syntax-- to address elements inside the editor pane. Take a look at a core theme like one-dark-syntax to see the modern way of doing it. What the error is actually telling you is that the theme package is old and will eventually stop working if nobody updates it.


#5

Well, OK, I might be. One of us is probably misunderstanding. The error message isn’t very important to me, however.

My question is simply: What, if anything, is a meta separator?

I did find this master scope list, and it has a relevant entry, but it’s meta.separator.markdown, there’s no general meta.separator there. It might of course not be used for anything, and it’s appearance in the theme I linked to earlier is a mistake.


#6

I shared a link in my first comment that points to an instance of meta.separator that appears in the core package language-coffee-script:

  'separator':
    'match': '\\G[ ]{0,3}([-*_])([ ]{0,2}\\1){2,}[ \\t]*$\\n?'
    'name': 'meta.separator.markdown'

In order to apply a CSS property, you only need one class on the element. Multiple classes are useful for organizing your styling through specificity. So an element in the form of span.syntax--meta.syntax--separator.syntax--markdown can be addressed using any one of those terms, and you use more than one of them to distinguish it from all the other span or .syntax--meta elements. The theme package naturally excludes the class that identifies the language because it is intended to apply across all languages.