colors
colors copied to clipboard
Add an index.css file including all colours alongside index.js
I would like to use postcss-jit-props to extract only the variables I need from each colour stylesheet. It would allow me to do the following:
module.exports = {
plugins: {
"postcss-jit-props": {
files: [
path.resolve(__dirname, "node_modules/@radix-ui/colors/index.css"),
],
},
},
};
Now I should be able to use any radix colour anywhere in my css and postcss will import only that variable from the index.css file. However it requires that all available CSS variables be stored in a single file to read from. There is no option for this other than for me to combine all the available colour CSS files into a single file and use that.
Instead, I propose since there is already an index.js file exporting all the colours, why not include an index.css file that includes every colour variable.