To disable the behavior..
Programmatically:
(setq web-mode-enable-current-element-highlight nil)
web-mode-enable-current-element-highlight is a variable defined in
‘web-mode.el’. Its value is nil
Documentation: Disable element highlight.
Interactively:
M-x web-mode-toggle-current-element-highlight
return
web-mode-toggle-current-element-highlight is an interactive compiled
Lisp function in ‘web-mode.el’.
(web-mode-toggle-current-element-highlight)
Toggle highlighting of the current html element.
To continue to use the highlighting and just use a better color:
(eval-after-load "web-mode"
'(set-face-background 'web-mode-current-element-highlight-face "your-color"))
You can find what face is applied to text a number of ways. If you can get your cursor on the text. You can use M-x describe-face
which will give you a default option of the current face. Or you can use M-x describe-char
which will tell you what face is applied. You can customize faces through the customize
feature or with elisp. If you can't get your cursor on the face, try finding the face using customize-group
, list-faces-display
or by reading the packages code.