I know how to change the color of comments in styles.less with
atom-text-editor::shadow .comment{
color: [color]
}
but that does not change the color of the two forward slashes when coding in C
//comment
only the word comment is changed.
So how can I find out the right function to use to change the “/” character, and how can I find out which functions to use on my own? Like what about changing the color of “int” or “char”?
Thanks.
Solution
atom-text-editor::shadow .punctuation.definition.comment
will change ‘/’ and ‘*’ characters to whatever colors you want.
However if it is a comment in the form of
/*
*
*
*/
Then the intermediate ‘*’ characters will remain the same color as the .comment colors.
To change the function brackets { } use .punctuation.definition.section
To find out on your own what you will need to put after atom-text-editor::shadow in your styles.less file:
- View->Toggle Developer Tools.
- In the top left of the window that just opened click the magnifying glass icon
- Click on the element that you want to change the color of
- The answer will be placed in the bottom left among other CSS (I think) information with a box of the color that the element currently has.