How can I escape string css in sass/scss?

后端 未结 1 405
温柔的废话
温柔的废话 2021-01-17 11:46

I have a string that contain a css value and I want to use it but with gruntjs return me an error

Syntax error: Invalid CSS after \"   @media \": expected me         


        
1条回答
  •  一个人的身影
    2021-01-17 12:20

    You can make use of the unquote function:

    $from-smartphone-portrait: unquote("only screen and (min-width: 1px)");
    

    To use the variable for the media query definition:

    @media #{$from-smartphone-portrait} {
    

    0 讨论(0)
提交回复
热议问题