Open BeatLaG opened 8 years ago
Thanks, good suggestion!
@BeatLaG Do you know how WordPress handles IE? Do they use a polyfill or do they just degrade the experience on IE?
Looks like they are using a polyfill to handle old browsers based in -> https://scottjehl.github.io/picturefill/ adding in this way an extra dependency :(
Yeah that's too bad, but I think in the end it would still be cleaner to use srcset
as opposed to the current situation: viewport width calculations and using a rather verbose syntax.
Currently, around 65% of browsers used (globally, 75% in USA) support the srcset
attribute (caniuse).
Picturefill looks really nice, but its minified source is 11.5 KB
(compared to currently 2 KB
for unveil2).
Maybe we should just include instructions on how to include picturefill and leave the choice of using it up to users? Upside is modularity, downside is extra complexity (which will will fade away over time as browser support increases).
I totally agree, Joram. Let the user choose would cover any scenario. In the worst case when not implementing a polyfill the markup would be only working for the main src attribute and not affecting to the other pictures set, this would result in non broken layouts in any case. The only point would be that unveil would not work for those pictures in the set.
To me it sounds perfect, much better that bloating the plugin and doing it heavy.
Since Wordpress implements this feature natively, it would be awesome seeing the plugin to handle images sets :)