我是Atom的新手,我想知道我们是否可以通过style.less
(Atom > Stylesheet...)
文件自定义One Dark Syntax Theme附带的评论样式。我查找了主题的源代码,并在language.less
文件中找到了这个:
.comment {
color: @mono-3;
font-style: italic;
.markup.link {
color: @mono-3;
}
}
具体来说,我想更改为font-style
到normal
,但我似乎无法找到方法,请帮忙。谢谢。
答案 0 :(得分:8)
您不应再使用atom-text-editor::shadow
您现在应该使用
atom-text-editor.editor .syntax--comment {
font-style: normal;
}
答案 1 :(得分:3)
[更新]
Atom已经改变,接受的答案现在是你应该使用的答案!
[旧答案]
您尝试定位的元素位于文本编辑器元素的shadow DOM中;尝试
atom-text-editor::shadow .comment {
font-style: normal;
}
答案 2 :(得分:0)
具体来说,您可能希望将示例更改为
.editor, atom-text-editor::shadow {
.comment {
font-style: normal;
}
}