1

I'm using Emacs 26.1 in the terminal (emacs -nw).

When using css-mode, strings representing colors seem to be automatically highlighted. I don't find this feature useful, and further, the colors chosen often make the text illegible.

Is there a way to disable this while keeping CSS syntax highlighting and formatting?

enter image description here

Ian Mackinnon
  • 239
  • 1
  • 7
  • Just try `M-x font-lock-mode` to toggle `font-lock` off. If you like the effect to be permanent you can add `(add-hook 'css-mode-hook (lambda () (font-lock-mode -1)))` to your init file. Not yet posted as an answer since I did not test it. – Tobias Jul 02 '19 at 12:41
  • @Tobias, thanks, though that appears to disable the syntax highlighting as well. – Ian Mackinnon Jul 02 '19 at 12:45
  • Now I know what you mean! You can switch off `css-fontify-colors` in `M-x customize-option css-fontify-colors`. – Tobias Jul 02 '19 at 13:58

1 Answers1

3

You can switch off css-fontify-colors in the customization buffer that opens on M-x customize-option RET css-fontify-colors RET.

Tobias
  • 32,569
  • 1
  • 34
  • 75