Styles.less, how to address classes shown at "Scopes at cursor"


#1

Hello there

The reason for my question is that I wish single and double quoted text to have different colours (because they have different meaning when coding PHP).

Even though this is about php syntax the question really is generic and comes down to how I can address the local scopes that I find when pressing CMD+ALT+P.

I have already read this thread which is about the very same issue:

So basically when I have a local stope like “meta.string-contents.quoted.double.php” and wish to know how to address this scope with overrides in the styles.less file.

I have attempted something like this withour success:

meta.string-contents.quoted.double.php {
  color: #FF0000;
}

Regards, Mikkel


#2

See the FAQ:


#3

Based on your answer I did this which seems to work (darkens single quotes so they can be easily discerned from double ones):

atom-text-editor::shadow {
  .string.quoted.single.php {
    color: #2B9C00;
  }
}

#4

I edited your posts to use fenced code blocks to make them more readable, @Stenbjerglykke. I hope you don’t mind.