-
Notifications
You must be signed in to change notification settings - Fork 35
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
Error handling for sizes attribute #113
Comments
I think that skipping the whole source, so that a fallback sizes can be defined is better for future compat. In the "just use <hat you understand" option, authors cannot define a fallback for older browsers. OTOH, if the author haven't defined a fallback source, older browsers will get a significantly worse experience with this option. I guess it boils down to what is more probable. Do we think that authors are likely to define fallback content? |
Realistically speaking, it seems unlikely that authors will include a fallback |
@tabatkins in #86 says that invalid |
Hm, that's a problem. It should skip things. I'll fix. |
#97 is about srcset, let's talk about sizes.
Pondering about it a bit, I think it makes more sense to use CSS rules for sizes than it does for srcset. sizes can contain media queries, and media="" already uses CSS rules in HTML. Also it's supposed to support things like
calc
or other things CSS supports in place of a<length>
.Right now, if sizes fails to parse, the attribute is ignored. Is that what we want?
Take this example from the spec:
If the UA doesn't support
calc
, then it acts as if sizes was absent. Do we instead want to act as ifsizes="(max-width: 30em) 100%, (max-width: 50em) 50%"
(so that the browser at least does the right thing for 2 of the 3 layouts)? Or skip the wholesource
(so the author can specify a fallbacksource
without using calc)? Something else?The text was updated successfully, but these errors were encountered: