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

[SSR] Hydration error using v-bind in scoepd styles #10259

Closed
TheAlexLichter opened this issue Feb 2, 2024 · 2 comments
Closed

[SSR] Hydration error using v-bind in scoepd styles #10259

TheAlexLichter opened this issue Feb 2, 2024 · 2 comments

Comments

@TheAlexLichter
Copy link

TheAlexLichter commented Feb 2, 2024

Vue version

3.4.15

Link to minimal reproduction

https://stackblitz.com/edit/vue-issues-10259

Steps to reproduce

<script setup lang="ts">
const test = 100;
const test2 = 'red';
</script>

<template>
  <div class="darn-it" style="padding: 100px" />
</template>

<style scoped>
.darn-it {
  width: calc(v-bind(test) * 1px);
  height: calc(v-bind(test) * 1px);
  background-color: v-bind(test2);
}
</style>

What is expected?

No hydration error

What is actually happening?

 [Vue warn]: Hydration style mismatch on 
<div class="darn-it" style="padding:100px;--7a7a37b1…0;--7a7a37b1-test2:red;" data-v-7a7a37b1=""> 
  - rendered on server: style="padding:100px;--7a7a37b1-test:100;--7a7a37b1-test2:red;"
  - expected on client: style="padding:100px;"
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch. 
  at <App>

System Info

StackBlitz env

Any additional comments?

From nuxt/nuxt#25588

@TheAlexLichter TheAlexLichter changed the title Hydration error with v-bind [SSR] Hydration error using v-bind Feb 2, 2024
@TheAlexLichter TheAlexLichter changed the title [SSR] Hydration error using v-bind [SSR] Hydration error using v-bind in scoepd styles Feb 2, 2024
@yangxiuxiu1115
Copy link
Contributor

Looks like a duplicate of #10215.

yangxiuxiu1115 pushed a commit to yangxiuxiu1115/core that referenced this issue Feb 2, 2024
@TheAlexLichter
Copy link
Author

Good point! Closing here in favor of #10215

@TheAlexLichter TheAlexLichter closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants