Skip to content

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

Closed
@WJCHumble

Description

@WJCHumble

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions