Import regular CSS file in SCSS file?

后端 未结 13 1610
旧巷少年郎
旧巷少年郎 2020-11-22 06:19

Is there anyway to import a regular CSS file with Sass\'s @import command? While I\'m not using all of the SCSS syntax from sass, I do still enjoy it\'s combini

13条回答
  •  独厮守ぢ
    2020-11-22 06:30

    You must prepend an underscore to the css file to be included, and switch its extension to scss (ex: _yourfile.scss). Then you just have to call it this way:

    @import "yourfile";
    

    And it will include the contents of the file, instead of using the CSS standard @import directive.

提交回复
热议问题