Closed robcalcroft closed 6 years ago
We have our CSS custom props defined in a JSON file which is imported like:
This is incorrect. See doc: http://cssnext.io/usage/#features
Your setup should be like
'postcss-cssnext': {
browsers: ['>.25%', 'IE 8'],
features: {
customProperties: {
variables: {
'color-primary': red
},
},
},
},
We have our CSS custom props defined in a JSON file which is imported like:
We can then use that var as normal with no issues Then trying to use it with the
color()
function:And this doesn't work. The resulting color is just black.
Doing:
does work