Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, the idea was to do stuff like

    @media(max-size: 200px) { #container { background: url(tiny_mobile.png); } }

    @media(max-size: 400px) { #container { background: url(small_mobile.png); } }

    @media(max-size: 800px) { #container { background: url(medium_tablet.png); } }

    @media(max-size: 2000px) { #container { background: url(large_desktop.png); } }

    @media(min-size: 2000px) { #container { background: url(retina.png); } }
Not always loading the same image is a good idea on mobile.


See my reply elsewhere. Background images are bad meaning this isn't a very compelling argument.


Often these aren't really background images, they're just using that to set image sources via CSS. These days you can do the same thing with srcset, which also allows someone to learn your screen resolution.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: