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?
I wanted to use the LESS mixin to avoid writing media queries for high resolution images. When I just
.retina('img.png');
and usebackground-size: cover;
on the same element, but through another selector, which unfortunately has a lower priority, I need to resort tobackground-size: cover !important;
to overwrite thebackground-size: auto auto;
default of the mixin. Why isbackground-size
set anyway, aren't@extras
enough?Edit I see that
background-size
is required as settingbackground
resets the size. But how should I cope with my problem description?