Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable not respected #237

Open
georgleber opened this issue Oct 18, 2017 · 0 comments
Open

Variable not respected #237

georgleber opened this issue Oct 18, 2017 · 0 comments

Comments

@georgleber
Copy link

I am using grunt-contrib-sass for my build process to generate different CSS files, depending on several SASS files. Currently I am facing one problem, where one variable, I want to overwrite in another SASS file is not respected. For other variables this is working as expected.
My grunt task looks like this:

sass: {
        develop: {
            files: [{
                expand: true,
                cwd: 'sass/customizing',
                src: ['**/*.scss'],
                dest: '<%= distdir %>/assets/css',
                ext: '.css'
            }]
        }
    }

The file structure is like this:

/sass/
    - base/_base.scss
    - customizing/
        - main.scss
        - demo/
            - main-demo.scss
            - _custom-variables.scss
    - skedflex/
        - _variables.scss
        - _fullcalendar_custom.scss
        - ...

The main.scss includes all relevant SASS files and also the _variables.scss of the skedflex folder. This works all as expected:

/*
 *   SkedFlex Design
 */
@import "../skedflex/variables";

// load Base Styles here
@import "../base/base";

/* ++++++++++++++++++++++++++++++++
 * Other Styles
 * +++++++++++++++++++++++++++++++ */
@import "../skedflex/fullcalendar_custom";
...

The file /sass/demo/main-demo.scss is another SASS definition that should overwrite some of the variables and use them in the generation process. But some of the variables are not recognized. The file is defined as follows:

/*
 *   SkedFlex Design
 */
@import "../skedflex/variables";
@import "custom-variables";

// load Base Styles here
@import "../base/base";

/* ++++++++++++++++++++++++++++++++
 * Other Styles
 * +++++++++++++++++++++++++++++++ */
@import "../skedflex/fullcalendar_custom";
...

I have also tried to use the option noCache: true but this also has no effect. What am I doing wrong here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant