Writing browser specific hack in Less (for <IE9)

前端 未结 3 736
鱼传尺愫
鱼传尺愫 2021-01-23 01:14

I want to do something like this (Source - CSS Tricks Article):

#veinte { color/*\\**/: blue\\9; }

in

3条回答
  •  无人共我
    2021-01-23 01:36

    Property name interpolation is possible with Less v1.6.0 and above. Hence this hack can be implemented as shown below:

    @hack: ~"/*\**/";
    #veinte { 
        color@{hack}: blue\9; 
    }
    

    Compiled CSS:

    #veinte {
        color/*\**/: blue\9;
    }
    

提交回复
热议问题