Sass file completion for nested elements (BEM) with webpack Sass Loader.

Hi,
I'm importing styles from my external file as (webpack sass-loader) :

import styles from './StylesFile.scss';

And inside of StylesFile.scss I have:

.special-button {
&__icon {
color: blue;
}
}

And when I want to use these styles object like: 

<div classNames={styles['special-button__icon']}> Test </div>

*classNames are React specific but it shouldn't be different than a class attribute.

And my WebStorm only autocompletes special-button but can't see __icon suffix.

It is critical for me to be working.

How should I achieve that?

0

Please sign in to leave a comment.