Closed mikeybinns closed 8 months ago
Sass identifiers treat hyphens and underscores as identical. So, it should not break your code even if you apply it as is.
Technically, we can attempt to use source mapping to get the original input for variable name for recommendation, but it's only cosmetic.
Well I've learned something today. I still think it's worth fixing. I would wager there's a large amount of people who don't know that, and so it would be a source of confusion if there were mixed hyphens or underscores for the same variable name, as many other languages treat them differently.
It may also break certain intellisense plugins such as this one for VS Code which has over 1 million downloads. I understand that this is technically a bug in that extension, but I think it should still be considered due to its popularity.
I also personally prefer underscores to hyphens simply because with underscores, you can double click to select the whole variable name, where as with hyphens, it will only select part of that name.
For some reason, when I see a deprecation message, the recommendation it provides replaces the underscores with hyphens, which then breaks the code. I'm not sure if this happens with the automatic migrator as I'm not using it.
Steps to recreate:
The projects I've seen this on use Gulp and Gulp Sass, with this package passed into gulp-sass.