import .css file into .less file

后端 未结 9 820
渐次进展
渐次进展 2020-11-28 01:35

Can you import .css files into .less files...?

I\'m pretty familiar with less and use it for all my development. I regularly use a structure as follows:



        
9条回答
  •  感动是毒
    2020-11-28 02:10

    since 1.5.0 u can use the 'inline' keyword.

    Example: @import (inline) "not-less-compatible.css";

    You will use this when a CSS file may not be Less compatible; this is because although Less supports most known standards CSS, it does not support comments in some places and does not support all known CSS hacks without modifying the CSS. So you can use this to include the file in the output so that all CSS will be in one file.

    (source: http://lesscss.org/features/#import-directives-feature)

提交回复
热议问题