Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
WJCHumble opened this issue Jul 24, 2021 · 0 comments · Fixed by #4188

Comments

@WJCHumble
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant