Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Could not resolve the variable ... within ... #123

Open
jesperlandberg opened this issue Oct 1, 2018 · 3 comments
Open

Could not resolve the variable ... within ... #123

jesperlandberg opened this issue Oct 1, 2018 · 3 comments

Comments

@jesperlandberg
Copy link

Could not resolve the variable ... within ...

Anyone know why I get this error?

mixin im trying to setup:

@define-mixin font-size $val {
  font-size: calc($val * (100vw / var(--base-grid)));
}

postcss.config.js

module.exports = {
  plugins: {
    'precss': {},
    'postcss-for': {},
    'cssnano': {}
  }
}
@henyulee
Copy link

henyulee commented Mar 5, 2019

Many thanks! I also get a same question

@maxmilton
Copy link

Is the mixin being imported from another stylesheet? If so it may be related to csstools/postcss-advanced-variables#71

@paulshryock
Copy link

I was getting the precss could not resolve the variable ___ within ___ error, and I was able to resolve the issue by changing my processing workflow. I'm using PostCSS inside a Gulp task, and my gulp.src included all my CSS files, including the files which had variables. I changed my gulp.src to only include my style.css file, which imports other files which define and make use of various variables, and that resolved the problem.

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

No branches or pull requests

4 participants