A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/issues/9231 below:

style binding keeps falsy values · Issue #9231 · vuejs/vue · GitHub

Version

2.5.21

Reproduction link

https://codesandbox.io/s/o95x14r0xz (I know, minimal repro below)

Steps to reproduce

View page source

What is expected?
<div class="v-responsive" style="height:480px;" data-v-2a183b29>
What is actually happening?
<div class="v-responsive" style="height:480px;max-height:undefined;max-width:undefined;width:undefined;" data-v-2a183b29>

Reproduce in vue/test/ssr/ssr-string.spec.js then run npm run test:ssr:

  it('falsy style value', done => {
    renderVmWithOptions({
      template: '<div :style="style"></div>',
      data: {
        style: {
          opacity: 0,
          color: null
        }
      }
    }, result => {
      expect(result).toContain(
        '<div data-server-rendered="true" style="opacity:0;></div>'
      )
      done()
    })
  })

usb248, TheAlexLichter and tangjinzhou


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4