Subscribe on changes!

State-Driven Dynamic CSS: v-bind don't work inside media queries

avatar
Aug 12th 2021

Version

3.2.2

Reproduction link

[https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICAgIDxkaXYgPlxuICAgIEhlbGxvIVxuICA8L2Rpdj5cbjwvdGVtcGxhdGU XG5cbjxzY3JpcHQgc2V0dXA XG5jb25zdCB3aWR0aCA9ICc3MDBweCdcbjwvc2NyaXB0PlxuXG48c3R5bGUgIHNjb3BlZD5cbiAgQG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiB2LWJpbmQod2lkdGgpKSB7XG4gICAgZGl2IHtcbiAgICAgIGNvbG9yOiByZWQ7XG4gICAgfVxuICB9XG48L3N0eWxlPiJ9](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICAgIDxkaXYgPlxuICAgIEhlbGxvIVxuICA8L2Rpdj5cbjwvdGVtcGxhdGU XG5cbjxzY3JpcHQgc2V0dXA XG5jb25zdCB3aWR0aCA9ICc3MDBweCdcbjwvc2NyaXB0PlxuXG48c3R5bGUgIHNjb3BlZD5cbiAgQG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiB2LWJpbmQod2lkdGgpKSB7XG4gICAgZGl2IHtcbiAgICAgIGNvbG9yOiByZWQ7XG4gICAgfVxuICB9XG48L3N0eWxlPiJ9)

Steps to reproduce

v-bind after max-width and min-width inside media queries do not provide any data

What is expected?

Expected to see red font with screen width less than 700px

What is actually happening?

We get this css code after compiling: @media only screen and (max-width: v-bind(width)) { div[data-v-f13b4d11] { color: red; } }

avatar
Aug 12th 2021

Don't duplicate issues