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

  • 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 2 '19 at 12:41
  • @Tobias, thanks, though that appears to disable the syntax highlighting as well. – Ian Mackinnon Jul 2 '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 2 '19 at 13:58
3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.