In my css i have several color variables like:
$bkg-color: #ffffff
white is what i want the default color to be but the $bkg-color could also be customized to a different color based on what the user creates and saves. So in my typescript i have:
backgroundColor?: string = '';
my get call response data is set to pageDetails and then i check
if(pageDetails.backgroundColor) {
this.backgroundColor = pageDetails.backgroundColor;
}
I cannot directly bind the background color class to the html because my page content is displayed via v-html='displayedHtml'
How can i set $bkg-color: this.backgroundColor (if exists || set default color of white).
i am using vue and typescript
i believe i can set the default like so: $bkg-color: #ffffff !default; but how i can make it assigned based on my data is where i am a bit lost.