According to this answer, I can make C++ mode think that underscores are not variable delimiters by adding this line to .emacs:
(modify-syntax-entry ?_ "w" c++-mode-syntax-table)
That seems to work well enough. But when I try to do something similar to CSS:
(modify-syntax-entry ?- "w" css-mode-syntax-table)
I get this error:
Symbol's value as variable is void: css-mode-syntax-table
Any ideas on how to fix this?