Closed VinSpee closed 9 years ago
Fixed 21a4d960f0615720ab0427310d19d6db540aace8
thanks @ai. What's your NPM patch release cycle like?
Of course, I am waiting for Travis CI finish :).
Released in 0.2.4.
still having this issue after updating to v0.2.4.
$ npm list --depth=0 | ag postcss-simple-vars
├── postcss-simple-vars@0.2.4
.pipe(postcss([
inline({
path: ['./app/styles/']
}),
simpleVars(),
nested,
customProperties(),
customMedia(),
calc(),
gray(),
colorHexAlpha(),
colorFunction(),
fontVariant(),
autoprefixer({ browsers: 'last 2 versions' })
]))
$palm : (min-width: var(--ms6));
$lap : (min-width: var(--ms7));
$desk : (min-width: var(--ms8));
$wall : (min-width: var(--ms9));
@custom-media --palm $palm;
@custom-media --lap $lap;
@custom-media --desk $desk;
@custom-media --wall $wall;
.🐜--mqs {
background: lime !important;
@media (--palm) {
background: red !important;
}
@media (--lap) {
background: blue !important;
}
@media (--desk) {
background: pink !important;
}
@media (--wall) {
background: yellow !important;
}
}
.🐜--mqs {
background: lime !important;
@media (--palm) {
background: red !important;
}
@media (--lap) {
background: blue !important;
}
@media (--desk) {
background: pink !important;
}
@media (--wall) {
background: yellow !important;
}
}
Any Ideas?
You have some problem with CSS processing. Simple vars plugin removes any variables from output. Custom media plugin removes @custom-media
at-rules. If they are still in output, this plugin was no be runned.
I'm sorry, my mistake. The @custom-media declarations aren't in the output. I updated my comment to fix that - the "output" is now what is actually compiled. As you can see, it is still not correct. I'm fairly certain this is not a problem with my processing. I have simpleVars listed before customMedia.
It is a problem with my processing order. thank you!
for anyone having issues that may stumble upon this, I needed this order:
customProperties(),
calc(),
simpleVars(),
customMedia()
INPUT:
OUTPUT:
I would expect that this variable is resolved. my plugin order: