CodeMirror - styling Tern intellisense labels

2019-04-12 16:55发布

I'm using the Tern plugin for CodeMirror, which adds intellisense features to the editor (i.e. pops up inline hint-labels).

I want to change the hint-labels style, how to do so?

1条回答
小情绪 Triste *
2楼-- · 2019-04-12 17:17

Tern attaches CSS classnames to the hint box, you can utilize them to style it, e.g.:

.CodeMirror-Tern-tooltip:before {
    content: url('http://n5.nabble.com/images/smiley/smiley_thinking.gif');
    width: 20px;
    height: 20px;
}

… which will result in this:

tern hint custom styling

查看更多
登录 后发表回答