-
-
Notifications
You must be signed in to change notification settings - Fork 211
[2.0.5] Output CSS Reversed/Jumbled #210
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
Comments
|
That I can do 👍 webpack.config.js (excluding non css-related bits) // Imports...
module.exports = (env = {}) => ({
// ...
module: {
loaders: [
// ...
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
'css-loader',
'postcss-loader'
]
})
}
]
},
plugins: [
// ...
new ExtractTextPlugin({
filename: '[name].[contenthash].css',
allChunks: true,
disable: env.dev === true
})
],
// ...
}) .postcssrc.js module.exports = {
plugins: [
require('postcss-import'),
require('postcss-modular-scale'),
require('postcss-cssnext'),
require('postcss-nested')
]
} Haven't checked extract text output yet although I'm pretty sure it'd be the same. I'm seeing this with |
As a heads up postcss-nested v2.0.0 (6 hours ago) maybe related to the PostCSS v6.0.0 major bump in cssnext ships with it's own nesting plugin included |
Thanks I'll try that and report back. |
Released in postcss-nested |
Resolved 🙃 ? No rush, but there is another bug which is to 💯 in |
Haven't tested yet but let's close and, if anything, I'll re-open if the postcss-nested fix doesn't work. |
I tried that fix (upgraded both this loader as well as postcss-nested) and I'm still seeing the issue unfortunately. Digging around a bit to see if someone has opened a ticket for this in one one of the other plugins I'm using but it doesn't look like it.
Yeah, however we are using the My gut feeling is that it must be either this package or |
Also tried blowing away all |
@skipjack try to |
Ok I'm pretty sure it is this package that's causing the issue. It happens when I upgrade just loader. @evilebottnawi tried that as well with no luck, thanks though. |
@skipjack can your create minimal test repo? Seems it is related to |
Yeah I can do that. |
As promised: postcss-issue-demo |
I'm happy to close this issue and move it elsewhere once we determine the root cause of the problem. |
PostCSS Issue Demopackage.json (The most likely case) - "postcss-nested": "^1.0.0",
+ "postcss-nested": "^2.x", The most likely reason ☝️ 😛 since .postcssrc.js module.exports = {
plugins: [
require('postcss-import'),
require('postcss-modular-scale'),
+ require('postcss-nested') // Maybe you don't need it,
require('postcss-cssnext'), // because I include postcss-nesting :),
- require('postcss-nested') // but postcss-nested [SASS] !== postcss-nesting [CSSWG Spec]
]
} You need to test that, if it worked before all good ¯_(ツ)_/¯, but it could be related to |
Unfortunately that doesn't fix it, I had tried that locally when I first experienced the issue. See this commit I just pushed in the demo repo. The ordering issue still remains. I think postcss-nesting wouldn't affect it, as postcss-nesting only allows @michael-ciniawsky I guess it could be another one of the plugins that somehow isn't compatible with updated postcss under this package. |
Nope. I will look in next few hours. |
@skipjack It's |
Awesome, thanks for all of your help! Sorry I didn't pick up on this earlier. |
It worked with |
Yeah, I subscribed to that cssnext issue and will wait to upgrade everything until that's complete. |
I'm seeing a weird issue with the output from this loader. I can't share the actual code/output but this is essentially what's happening:
prior to loading
after loading
It's not all an exact reverse, but most of it is and the rest just seems randomly jumbled. Obviously this screws up the cascade (i.e. when
some-class
andsome-class--mod
are applied to the same element, thecolor
isblack
instead ofwhite
).Here are the plugins I'm using postcss-import, postcss-modular-scale, postcss-cssnext, and postcss-nested.
The text was updated successfully, but these errors were encountered: