import .css file into .less file

后端 未结 9 796
渐次进展
渐次进展 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:05

    From the LESS website:

    If you want to import a CSS file, and don’t want LESS to process it, just use the .css extension:

    @import "lib.css"; The directive will just be left as is, and end up in the CSS output.

    As jitbit points out in the comments below, this is really only useful for development purposes, as you wouldn't want to have unnecessary @imports consuming precious bandwidth.

提交回复
热议问题