-
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
add support for width/height on source tag #50
Comments
Since picture's dimensions may change between sources, that may make sense, On Tue, Jun 11, 2013 at 9:05 PM, attiks [email protected] wrote:
|
Some benefits:
|
This would mean a brand new addition to I’m reluctant to add this to the spec, as it involves altering the behavior of an established element and there really hasn’t been much call for it. -1 from me. |
With the poly fill the right source element is quickly detected, on really slow connections (2g) you might notice it, but not on a faster one. Without width and height you'll have reflow all the time even on WiFi connections and it's a PITA on mobile pages. Adding width/height on picture isn't an option, because sources probably have different sizes I know it complicates the current specs, but if we don't add it now it probably will never be added. |
Some background info https://developers.google.com/speed/docs/best-practices/rendering#SpecifyImageDimensions which also applies mostly to picture AFAIK |
I think once picture is implemented and the MQ are parsed on time, it will solve the reflow/repaint problem |
I'm with @attiks on this, reflow/repaint of a complex layout is a hit on performance, specially evident on feature phones or with slow connections. |
Reflow/repaint is a performance concern for certain, but represents a significantly smaller performance hit than the inclusion of |
@Wilto it is not only the performance that's a problem, it is - at least for me - annoying when it happens; you start reading the page and all of a sudden the whole text is shifted down, so it means you have to scroll and try to figure out where you were reading before the reflow happened. Adding w/h remedies this and it is similar to image, so - i hope - most people will be used to adding w/h to 'image' and it will help browsers while rendering the page, since they don't have to wait for the image to download. |
Sorry, I should’ve been more clear about closing this out: while this is something I’d absolutely like to see addressed, it isn’t something we’re comfortable adding to the specification at this time—or able to, where we can’t make changes to the spec for Closing the issue, but not forgetting it either. |
Thanks for clarifying |
@Wilto Any change this can be reconsidered, the reflow is bugging a lot of people, or will this be fixed when it is natively implemented? /cc @yoavweiss |
We've discussed resolving the reflows in #85. |
Yeah this is a dup of #85 AFAICT. For now you have to use CSS (with media queries if necessary) to set the right dimensions on the |
I just saw a comment in #49 referring to the lack of width and height on the source tag, for the polyfill the used by Drupal we added it to avoid reflow while the page is loading.
Can we add it to source?
The text was updated successfully, but these errors were encountered: