SASS global variables not being passed to partials

后端 未结 5 1963
被撕碎了的回忆
被撕碎了的回忆 2020-12-14 01:40

Basically I have a structure that used to work perfectly in 3.0.x and now it breaks with undefined variable errors.

  • partials
    • _base.css.sa
5条回答
  •  不知归路
    2020-12-14 02:34

    There is a simple solution for the original topic. Your application and main css files should be scss files. That means you can use the known syntax:

    /*
     *= require_self
     *= require main
     */
    

    In main.scss you can import the partials like this:

    @import 'partials/base'
    @import 'partials/header'
    

    These files are sass files and you can benefit from the greatness of SASS ;-)

提交回复
热议问题