Open ok2ju opened 5 years ago
The format that you use for the themes/red.js
is not compatible with ^8 version.
You should have :
module.exports = {
customProperties: {
'--button-label-color': 'red'
}
};
The format that you use for the
themes/red.js
is not compatible with ^8 version. You should have :module.exports = { customProperties: { '--button-label-color': 'red' } };
Please, check postcss.config.js
example above. I passed theme as:
...
features: {
'custom-properties': {
preserve: false,
importFrom: [{
customProperties: theme,
}],
},
},
So, it is the same approach as you propose.
Hi,
importFrom
behaviour differs from deprecatedvariables
.importFrom
does not take effect when using withpostcss-import
. My usecase:colors.css
theme.css
And for example depending on env variable I want to pass another css variables (theme).
postcss.config.js
webpack.config.js
themes/red.js
In this example theme passed through
importFrom
does not take effect. Is this correct behaviour or I missing something? And if it correct how can I make it work properly?