You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reactive style bindings overwrite server-rendered styles during hydration #3180
The class and data attribute preserve their server values, but the style
is immediately replaced with the client value.
Steps to Reproduce the Bug or Issue
Insert server markup with a dynamic inline style.
Hydrate it with a different initial client style value.
Inspect element.style immediately after hydrate().
Expected behavior
The server-rendered style should be preserved during initial hydration, consistent with class and other attributes. The first subsequent reactive update should apply the client value.
Platform
@solidjs/web: 2.0.0-rc.4
next: f051db6a
Tested with both native and Babel compiler paths
jsdom 25
Additional context
setAttribute, setProperty, setAttributeNS, and className return early
for hydrating nodes.
The style() and setStyleProperty() runtime helpers do not perform the
same hydration check, so all reactive style paths write to CSSOM during the
initial claim pass.
I searched the existing style and hydration issues and could not find one
covering this initial hydration behavior.
Fixed in c21b0a4 on next — style()/setStyleProperty() gained the hydration guard, so server-rendered styles are preserved and the first post-hydration change diffs against them. Ships in the next RC.
Activity
fix(web): preserve server-rendered styles during hydration (#3180)
ryansolid commentedon Sep 1, 2026
Fixed in c21b0a4 on next — style()/setStyleProperty() gained the hydration guard, so server-rendered styles are preserved and the first post-hydration change diffs against them. Ships in the next RC.