Sass使用@ at-root

时间:2015-11-18 11:54:37

标签: html css sass

如何正确声明sass语句以在注释中生成输出css?

.formModal{
    .modal-body{
        .inputTextWrap{

            /*
            .modal-body > .inputTextWrap:first-child {
                background:violet;
            }
            */

        }
    } 
}

1 个答案:

答案 0 :(得分:0)

试试这个:

.formModal{
    .modal-body{
        .inputTextWrap{
          @at-root .modal-body > .inputTextWrap:first-child{
         background: violet; //Remember you need a space after the:
          };
        }
    } 
}

你可以在sassmeister上查看这样的东西