Skip to content

:style with value 0 ignored #3905

@paulpflug

Description

@paulpflug

Related to #3816

Vue.js version

2.0.1

Steps to reproduce

I having problems with reproducing on jsfiddle, and even in my projects it is inconsistent:

<div v-bind:style="style"></div>
data: ->
  style:
    top: 0

What is Expected?

div to have style="top:0px"

What is actually happening?

no top property in style

when I add this.style.left=0 at runtime it shows up - but on rerender it is missing again
Vue inspector also shows style.right=0

as a string it works as expected:

data: ->
  style:
    top: "0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions