Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed parsing 'srcset' attribute value since it has an unknown descriptor #1052

Closed
alizhdanov opened this issue Nov 10, 2017 · 0 comments
Closed

Comments

@alizhdanov
Copy link

alizhdanov commented Nov 10, 2017

Version

13.5.0

Reproduction link

https://github.com/makedonec88/vue-loader-srcset-bug

Steps to reproduce

If you haven't specified srcset descriptor vue'll render it with undefined and in my case, break picture tag behaviour

<picture>
  <source srcset="http://www.gstatic.com/webp/gallery/1.webp">
  <source srcset="http://www.gstatic.com/webp/gallery/1.jpg">
  <img src="http://www.gstatic.com/webp/gallery/1.jpg" alt="test image">
</picture>

What is expected?

The same <picture> tag

What is actually happening?

<picture>
  <source srcset="http://www.gstatic.com/webp/gallery/1.webp undefined">
  <source srcset="http://www.gstatic.com/webp/gallery/1.jpg undefined">
  <img src="http://www.gstatic.com/webp/gallery/1.jpg" alt="test image">
</picture>

Specs say

srcset value must consist of one or more image candidate strings ...
... An image candidate string consists of ...
...Zero or one of the following: A width descriptor or A pixel density descriptor

Si I'm expecting that I don't have to specify descriptor in each srcset

P.S. I believe related to this issue #1005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant