There does not seem to be a way in yasnippets to do what you want. So you should open issue on yasnippet
github repo requesting this feature.
As a temporary solution you can disable loading of haml-mode
snippets in sass-mode
by advising yas--modes-to-activate
as follows. Remember this is NOT recommended
(eval-after-load "yasnippet"
'(progn (defadvice yas--modes-to-activate (after my-simple-advise)
(when (eq major-mode 'sass-mode)
(setq ad-return-value (remove 'haml-mode ad-return-value))))
(ad-activate 'yas--modes-to-activate)))
The above advises yas--modes-to-activate
so that haml-mode
is not returned as a mode to load when in sass-mode
.