I am facing a unique challenge in my current project. I need to dynamically apply colors from data inside a v-for loop, specifically for the :after CSS pseudo-element. While normal CSS properties are easily applicable, I am struggling with applying styles for :after. Here is what I have tried so far:
<div class="_tmln_shdl_crd_itm" v-for="(t, i) in timeLine" v-if="timeLine.length">
<div class="_tmln_shdl_itm_lft">
<p :style="`color:${t.color}`">{{t.time}}</p> // THIS WORKS
</div>
<style>
._tmln_shdl_itm_r8_one h4:after{ // ATTEMPTED TO WRITE CSS WITH FOR LOOP BUT FACED DIFFICULTIES
color: t.color
}
</style>
<div>
Can anyone suggest how I can successfully style ._tmln_shdl_itm_r8_one h4:after
? I appreciate any solutions or insights. Thank you.