JS starter
JS starter

Reputation: 125

How can I customize the comment styles that come with Atom One Dark theme?

I'm new to Atom and I was wondering if we could customize the comment styles that come with the One Dark Syntax Theme via the style.less (Atom > Stylesheet...) file. I looked up the source code for the theme and in the language.less file I found this:

.comment {
color: @mono-3;
font-style: italic;

.markup.link {
color: @mono-3;
  }
}

Specifically, I would like to change to font-style to normal but I can't seem to find a way, please help. Thanks.

Upvotes: 5

Views: 2950

Answers (3)

Michelle Tilley
Michelle Tilley

Reputation: 159145

[Update]

Atom has changed and the accepted answer is now the one you should use!

[Old Answer]

The elements you're trying to target are inside the text editor element's shadow DOM; try

atom-text-editor::shadow .comment {
  font-style: normal;
}

Upvotes: 3

Davaakhuu
Davaakhuu

Reputation: 248

Specifically, you would want to change your example to

.editor, atom-text-editor::shadow {
  .comment {
    font-style: normal;
  }
}

Upvotes: 0

Abdalla Arbab
Abdalla Arbab

Reputation: 1400

You shouldn't use atom-text-editor::shadow any more

enter image description here

You should now use

atom-text-editor.editor .syntax--comment {
  font-style: normal;
}

Upvotes: 9

Related Questions