Comments (8)
Just another data point:
I tried added a custom parser to my config, hoping to suppress the warning since it seems like it is asking for at least one of those config properties. I added postcss-scss
as my parser, and I still got the warning.
I also tried renaming my files to end in the .scss
extension, because I didn't know if that would matter. Still got the warning.
I did a little more digging, and found that the Processor#process
method is being called twice. The first time the self.plugins
array contains one value, null
. The second time self.plugins
is an empty array. The warning is generated that second time.
My theory is that when this plugin encounters an @import
, it asks postcss
to process the target file, but doesn't pass along the config properly. That might be why the second time the method is run it finds an empty plugins
array.
PS. I'm curious why the first time the method is called it has a single null
in that array, but I don't know anything about postcss internals. It just seems odd.
from postcss-advanced-variables.
I think I'm seeing this when @import
ing a css file from inside node_modules.
from postcss-advanced-variables.
Have got a minimal case now.
This file compiles without error
@import 'included.css';
This file generates the error
.some-class {
@import 'included.css';
}
from postcss-advanced-variables.
I don’t think I have ever supported @import
within a rule. How might this be related to the recent major release?
from postcss-advanced-variables.
😢
my minimal case works in 2.3.2 - just my luck if this was accidental all along! :-)
from postcss-advanced-variables.
btw an example of why this behaviour is really useful: namespaced themes, by doing
a.css
$colour=#0f0;
.theme-a {
@import 'everything.css';
}
b.css
$colour=#f00;
.theme-b {
@import 'everything.css';
}
the unexpected thing is that despite the error message, the right css is generated. ¯_(ツ)_/¯
from postcss-advanced-variables.
i'm also experiencing this warning, seemingly for no reason. my minimum test case is as follows:
Invoked postcss using postcss-cli (v6.1.0). This includes postcss
version 7.0.7.
$ postcss styles/test.css -o output.css
Using the following postcss.config.js
in the cwd:
module.exports = {
plugins: [
require('postcss-advanced-variables')(),
],
};
On the following file (styles/test.css
):
@import './test_include.css'
With the following file sitting beside it (styles/test_include.css
):
p {
padding: 16px;
}
In fact, even if i make styles/test_include.css
completely blank, I still get the warning.
from postcss-advanced-variables.
I think PostCSS no longer produces this warning.
from postcss-advanced-variables.
Related Issues (20)
- Publish latest version to npm HOT 1
- Dependency on postcss v7.0.6 exposes security vulnerability (PostCSS < 8.4.31) HOT 1
- Upgrading from v3.0.1 to v4.0.0 triggers warnings in Nuxt HOT 1
- Upgrading to 4.0.0 stops resolving variables HOT 2
- Add support for @function?
- Handling multi-levels variables? HOT 3
- Can't resolve #{} in webpack postcss plugin HOT 8
- Publish release HOT 3
- TypeError: Cannot read property 'toLowerCase' of undefined HOT 1
- Move postcss to peerDependencies
- Update to use PostCSS v8 HOT 1
- @each don't work properly. HOT 1
- Global declarations HOT 2
- Could not resolve variable $c within #{$c}__label{ ... } HOT 1
- Suggestion for a new feature: Read-Only Variables to Overide other Variables HOT 2
- Could not resolve the variable "$pad" within "calc(100% - $pad * 2)" HOT 1
- Publish to npm HOT 6
- Loading global mixins and variables from file HOT 1
- Variable property name
- Not evaluating number when passing variables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postcss-advanced-variables.