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

[issue] import from other files does not work yet #4

Closed
ranisalt opened this issue Feb 12, 2014 · 4 comments
Closed

[issue] import from other files does not work yet #4

ranisalt opened this issue Feb 12, 2014 · 4 comments

Comments

@ranisalt
Copy link

I cannot use the mixins, variables and whatever I try to import from another file. I'm trying to mix bootstrap with my code to create semantic HTML, but I always have a compiler error telling me something imported is not working.

The public/scss/application.scss file is:

@import 'bootstrap/mixins';

#content-container {
    @include container-fixed();
}

And inside public/scss/bootstrap/_mixins.scss I have

// Centered container element
@mixin container-fixed() {
  margin-right: auto;
  margin-left: auto;
  padding-left:  ($grid-gutter-width / 2);
  padding-right: ($grid-gutter-width / 2);
  @include clearfix();
}

But it throws the following error:

Exception

Undefined mixin container-fixed: failed at `@include container-fixed();` line: 4

Am I doing something wrong or is this an issue?

@panique
Copy link
Owner

panique commented Feb 12, 2014

Hey, that's already an issue (on the parallel-project php-sass-watcher): panique/php-sass-watcher#2

The cross-file-compiling via @import is currently not supported. To workaround this issue, don't import from other files (put the mixin code into your style.scss).

I'm working on this issue... Please note that the project is only 24hrs young :)

@panique
Copy link
Owner

panique commented Feb 12, 2014

And to be serious: How should the script know that you have your mixins in a folder called "bootstrap/mixins" ? :)

@panique
Copy link
Owner

panique commented Feb 12, 2014

Okay i've fixed this now :)
But make sure your mixin files are exactly in the same folder as your other .scss ! When there's time then I'll add custom mixing folder support too

@panique panique closed this as completed Feb 12, 2014
@ranisalt
Copy link
Author

Actually "bootstrap/mixins" is a file (bootstrap/_mixins.scss), at first I thought I was wrong with the syntax too haha. Good, I will provide feedback :D

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

2 participants