atom / one-dark-syntax

Atom One dark syntax theme
MIT License
443 stars 236 forks source link

Question about custom syntax #91

Closed felixsanz closed 7 years ago

felixsanz commented 7 years ago

Inside syntax-variables.less you can see:

// Custom Syntax Variables -----------------------------------
// Don't use in packages

What does that mean? The variables ARE used inside, so why don't use them in our own themes if the variable is used? For example:

/* editor.less */
  .line.cursor-line {
    background-color: @syntax-cursor-line;
  }
simurai commented 7 years ago

You could use it as long as you keep using the one-dark-syntax theme. But if you switch to another theme, it most likely doesn't have a variable called @syntax-cursor-line and then it will show an error.

Only these variables have a fallback and won't cause an error if not defined by the current theme.

It's probably best to move those "Custom Syntax Variables" into another file so that it's more clear.

felixsanz commented 7 years ago

@simurai But if i want to create my own theme, and i fork this repo just to get a template, should i mantain those variables in my own theme?

simurai commented 7 years ago

Oh.. yes, if you create your own theme, you can certainly keep them. Or delete, rename etc. Only the official variables have to stay.

"Don't use in packages" is not meant for packages like linter, autocomplete etc. not create another theme.