strues / retinajs

JavaScript, SCSS, Sass, Less, and Stylus helpers for rendering high-resolution image variants
http://retinajs.com
MIT License
4.42k stars 611 forks source link

Why does the LESS mixin set background-size? #263

Open maenu opened 8 years ago

maenu commented 8 years ago

I wanted to use the LESS mixin to avoid writing media queries for high resolution images. When I just .retina('img.png'); and use background-size: cover; on the same element, but through another selector, which unfortunately has a lower priority, I need to resort to background-size: cover !important; to overwrite the background-size: auto auto; default of the mixin. Why is background-size set anyway, aren't @extras enough?

Edit I see that background-size is required as setting background resets the size. But how should I cope with my problem description?