For instance:
<script>
export default {
data() {
return{
varinjs: 1,
}
}
}
</script>
<style lang="stylus">
varincss = varinjs
body
if varincss == 0
background-color red
else if varincss == 1
background-color blue
</style>
Is there a way to access JavaScript variables in CSS? I know I can use sass or less, but my preference is stylus.