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

Style attributes with numeric values are not rendered on server side #6625

Closed
fieteboerner opened this issue Sep 8, 2022 · 0 comments · Fixed by #6636
Closed

Style attributes with numeric values are not rendered on server side #6625

fieteboerner opened this issue Sep 8, 2022 · 0 comments · Fixed by #6636
Labels
🐞 bug Something isn't working scope: ssr

Comments

@fieteboerner
Copy link

Vue version

3.2.38

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-ats2me?file=generate.js&terminal=dev

Steps to reproduce

  1. npm generate.js

What is expected?

<div><p style="-webkit-line-clamp:2;--myVar:1;">Foo</p><p style="-webkit-line-clamp:2;--myVar:1;">Bar</p></div>

To get the exact same style attributes in the DOM in the server side rendered version. So the UI is not broken or jumping by loading/hydrating a SSR-Page.

What is actually happening?

<div><p style="">Foo</p><p style="-webkit-line-clamp:2;--myVar:1;">Bar</p></div>

its about the empty style attribute in the first paragraph.

This issue only occures in the SSR process. By rendering the exact same component in the browser, the style attributes with numeric values are rendered fine.

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    vue: ^3.2.38 => 3.2.38

Any additional comments?

No response

@LinusBorg LinusBorg added 🐞 bug Something isn't working scope: ssr labels Sep 8, 2022
yyx990803 pushed a commit that referenced this issue Nov 8, 2022
Previously this prevented custom properties and vendor-prefixed properties to be rendered correctly.

fix #6625
chrislone pushed a commit to chrislone/core that referenced this issue Feb 4, 2023
Previously this prevented custom properties and vendor-prefixed properties to be rendered correctly.

fix vuejs#6625
zhangzhonghe pushed a commit to zhangzhonghe/core that referenced this issue Apr 12, 2023
Previously this prevented custom properties and vendor-prefixed properties to be rendered correctly.

fix vuejs#6625
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: ssr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants