-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
Vue.js version
2.0.3
Reproduction Link
http://jsfiddle.net/jason_sanjose/0aat08kh/1/
Steps to reproduce
- Assume two custom components
parent
andchild
. Inparent
's template, usechild
with inline styles<child :style="styleComputed"></child>
- Render in browser
- Render on server
- Compare
What is Expected?
Inline styles should work consistently for browser and server environments.
What is actually happening?
Server does not render :style
attribute on child
// Browser
<div style="...computed style..."/>
// Server
<div/>
As a workaround, in the child
template, I've added :style
to the root element and passed down a style as a prop, e.g.
<div :style="passthroughFromParent"/>
It's not obvious from the docs if <child :style="styleComputed"/>
is valid code. I suppose an argument could be made that only custom properties defined in child
should be accepted?