I am trying to make website and I need to get access to my style thorough Vue.
I need to access CSS with Vue because style .skill-bar is background of bar and .skill-bar-fill is green filament which is supposed to have width based on number defined in Vue:
So I mean how can I change style of this .skill-bar-fill anytime I want by just changing number in Vue?
How can I change width of .skill-bar-fill separately in every item?
HTML
<div class="w-100 skill-bar">
<div class=" skill-bar-fill"> {{ programming.item1}} %</div>
</div>
CSS
.skill-bar{
text-align: center;
color: $black;
font-size: 0.75rem;
height: 1rem;
background: $bg-light;
border-radius: 1rem;
}
.skill-bar-fill{
height: 1rem;
background: $green;
border-radius: 1rem;
}
Vue
export default {
name: 'Items',
data() {
return{
programming: {item1: 95, item2: 90, },
}
}
}
And I am trying
