Vue: SSR - mismatched styles are not updated in the DOM unless the element has a ref

Created on 15 Nov 2017  路  1Comment  路  Source: vuejs/vue

Version

2.5.3

Reproduction link

https://codepen.io/anon/pen/GOvGBJ?editors=1010

Steps to reproduce

Load the codepen.
This is obviously not an actual SSR app, but is emulating one. The same thing happens with actual SSR that sets the padding based on window width.

What is expected?

The inline style should be updated when the page hydrates (see the codepen below)

What is actually happening?

The style only updates if the element has a ref
See https://codepen.io/anon/pen/aVyjoM?editors=1010

bug

Most helpful comment

This doesn't seem to have been fixed for classes?

No ref: https://codepen.io/anon/pen/yKyBYZ
With ref: https://codepen.io/anon/pen/PRwYPO

Should I open a new issue or is this expected behaviour?

>All comments

This doesn't seem to have been fixed for classes?

No ref: https://codepen.io/anon/pen/yKyBYZ
With ref: https://codepen.io/anon/pen/PRwYPO

Should I open a new issue or is this expected behaviour?

Was this page helpful?
0 / 5 - 0 ratings