In my App.vue @mounted() I create an api request to get stuff for my Application. In a response-property "style" i get json with styles. Which lookes like this:
"style": {
"general": {
"font-family": "",
"font-color": "",
"title_font_color": "",
"h1_font_color": "",
"background_color": "",
"sale_background_color": "",
"radius": ""
},
"cta": {
"cta_color": "",
"btn_font_color": "",
"radius": "",
"bar_background": "",
"bar_font_color": ""
},
"navigation": {
"normal_color": "",
"normal_background_color": "",
"focus_color": "",
"focus_background_color": ""
},
"floating_icons": {
"main_color": "",
"phone_color": "",
"mail_color": "",
"whatsapp_color": ""
}
},
I would like to generate scss variables like:
$general_font_family: font-family;
$general_font_color: font-color;
and so on. In main.js I import styles.sass where a variables.scss is included too.
Question: Where and how can I define all these variables with JS in App.vue and pass it to styles.sass? thanks in advance =)