Subscribe on changes!

When I commented the code of style css variable injection, it still generate css vars code on the style.

avatar
Jul 24th 2021

Version

3.2.0-beta.5

Reproduction link

https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICA8aDE+e3sgbXNnIH19PC9oMT5cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQgc2V0dXA+XG5jb25zdCBtc2cgPSAnSGVsbG8gV29ybGQhJ1xuY29uc3QgY29sb3IgPSBcInJlZFwiXG48L3NjcmlwdD5cblxuPHN0eWxlIHNjb3BlZD5cbiAgaDEge1xuICAgIC8qIGNvbG9yOiB2LWJpbmQoY29sb3IpOyAqL1xuICB9XG48L3N0eWxlPiJ9

Steps to reproduce

I commented the code of style css variable injection, like this:

<template>
  <h1>{{ msg }}</h1>
</template>

<script setup>
const msg = 'Hello World!'
const color = "red"
</script>

<style scoped>
  h1 {
    /* color: v-bind(color); */
  }
</style>

but it still generate css vars code on the style:

截屏2021-07-24 下午4 16 32

What is expected?

When I commented the code of style css variable injection, the css vars code will not be generated on the style.

What is actually happening?

It will generate css vars code on the style.