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

Add the rule for the relationship between srcset, sizes, and loading attributes. #1051

Open
YusukeHirao opened this issue Jun 4, 2023 · 0 comments

Comments

@YusukeHirao
Copy link
Member

Cite: https://html.spec.whatwg.org/multipage/images.html#srcset-attributes

Valid the descriptor in srcset

If an element has a sizes attribute present, all image candidate strings for that element must have the width descriptor specified.

sizes=auto on lazy state

The auto keyword may be specified in the sizes attribute of source elements and sizes attribute of img elements, if the following conditions are met. Otherwise, auto must not be specified.

The element is a source element with a following sibling img element.

The element is an img element.

The img element referenced in either condition above has a loading attribute which is in the Lazy state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant