2

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

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

1 Answer 1

4

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 and acknowledge you have read our privacy policy.

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