Repost :
In CSS, hyphens are part of identifiers (keywords, properties, selectors…). By adding it to the iskeyword list, Vim will consider identifiers as a whole word. Just to your .vimrc:
au! FileType css,scss setl iskeyword+=-
Tip by @Murderlon, shared with https://t.co/YYZR8cwhk2
— Mastering Vim (@MasteringVim) November 29, 2020