Changing comment color


I’m running the atom-dark-ui teme on Atom 1.10.2. Could someone tell me how to change the color of all comments to dark green? I can in Dev mode see that comments have a “comment” class, but where do I put the

.comment {color:green;}

declaration? Putting it in my toonbon/atom/styles.less file doesn’t work


Access styles.less
Changing HTML comment colors in styles.less

In styles.less, you need to address the shadow DOM inside the atom-text-editor comment (this is described in the default comments in styles.less).

atom-text-editor::shadow .comment {
  color: green;


Thank you!

I notice that when you put styling for Atom Commander into styles.less it requires a different format:

Do you know why that is?


It doesn’t? I’m confused. That’s the standard CSS format. Both the rule I posted and your Atom Commander example have their information organized in the exact same way. If you’re talking about the selector, that’s because the element with the directory class is inside the element with the atom-commander-list-view-table class. It is not inside a TextEditor, so there is no shadow DOM that needs to be addressed.


Yes, I was talking about the selector. Thanks for the answer.