I have the list of color codes in the JS file.
JavaScript:
export var ColorCodes = {
first:'#D09FD2',
second:'#A72500',
third:'#F67GHI',
fourth:'#8FERDD',
}
I tried to use the js variables inside the CSS file like below.
it throws errors.
CSS:
import 'my.js'
.firstColor{
font-size:15px;
color:ColorCodes.first;
}
.secColor{
font-size:12px;
color:ColorCodes.second;
}
HTML
<div class="firstColor">aaa</div>