SASS throws an error for BEM syntax

点点圈 提交于 2019-12-01 02:04:06
Vangel Tzo

In order to use the parent selector this way, you need to use Sass 3.3:

http://thesassway.com/news/sass-3-3-released#parent-selector-suffixes

If you're stuck using an older version, you could try this:

$module: 'second-title';

.second-title {
   background-color:green;
}

.#{$module}--touched{
  background-color:black;
}

.#{$module}__left{
 background-color:red;
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!