-
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
Change the syntax of srcset 'w' #161
Comments
@eeeps had some arguments against: http://ircbot.responsiveimages.org/bot/log/respimg/2014-04-23#T66713 |
What worries me about the Authoring errors such as I agree that 'w' invokes confusion (especially with the old spec still around). Maybe a |
What about a coordinate-y notation, e.g. |
Yes, that's also a valid concern @yoavweiss
|
True |
I think |
The only suggestion left is @yoavweiss' It looks a bit weird and it's not obvious what it expands to, but maybe that's a good thing because it makes it more likely that you'd look it up rather than assuming what it means. It makes it a bit longer though.
with
Seems OK to me. Another alternative could be Thoughts? Other ideas? |
It occurred to me now that the in the |
I like how I considered my AxB concerns a little more and they might be unfounded. It's a marvelously concise syntax which strongly connotes a pixel area / image size. In the digital world the order is almost always WxH. I've never heard anyone complain about the OS X “Get Info...” panel. Anybody that can learn/remember the ordering of, e.g. (Yoav's concerns about stray spaces and "x" re-use seem valid. Maybe we could require unicode MULTIPLICATION SIGN ×? [I kid! I kid!]) Similarly, while it's impossible to intuit which of the many possible widths So I guess at the end of the day I don't think any of these are horrible options. Just to throw a couple more out there:
|
Not to swoop in, but I haven’t seen many people voice confusion around the |
Anecdotal, but I have received bug reports from people expecting srcset to behave like what the WHATWG spec says, and have 'w' relate to the viewport. (they were glad to hear that it no longer does that though :) ) |
I’ve seen a couple too, but they’ve been from folks that go out of their way to study up on the subject—if this is much of an issue with run-of-the-mill authors, I gotta imagine it’ll be a short-lived one. Maybe we should gather some feedback on this one, early next week? |
Should we resolve this to keep the status quo? It seems we haven't come up with anything obviously better yet. |
@zcorpan - I think so, since there's no significantly better alternative. |
The srcset 'w' feature isn't obviously clear what it refers to, if it's the image width in image pixels or the image with in CSS pixels or min/max-width of the viewport (like old srcset) or something else.
It may be clearer to switch to
100x50
syntax instead, which is also used by<link sizes>
. It would mean authors have to give the height of the image, but maybe that's not an undue burden (it's probably always known if the image's width is known) and it allows us to set the intrinsic dimensions before the image is loaded (#85). It's also slightly shorter than100w 50h
.We don't have to support height-based selection with
sizes
(#86) at the same time as introducing height information insrcset
since height-based selection withsizes
would make syntax changes tosizes
which should be feature-detectable if we do it right.sizes
parsing now is forward compatible with both detecting and falling back to later entries in the value, so I think we're good there.More discussion in http://ircbot.responsiveimages.org/bot/log/respimg/2014-04-22#T66654 onward
The text was updated successfully, but these errors were encountered: