I have set up PostCSS parser with the help of and am currently exploring options to create a variables.css
file that will hold all my theme settings.
At this point, my variable.css
file appears as follows, containing a couple of variables:
:root {
--color-white: #FFF;
--color-black: #000;
}
I then import this file into other files where I intend to make use of these variables using @import './variables.css'
or a similar method. In those files, I utilize the variables like so:
background-color: var(--color-white)
. However, I encounter the following warning message:
Variable '--color-white' is undefined and used without a fallback [postcss-custom-properties]