I have a banner on a website with the following less/css class:
.element-link {
display: block;
background: url('url to image') repeat-x center center;
height: 71px;
background-size: cover;
cursor: pointer;
width: 100%;
}
and the html
<a class="element-link" href="url to other site" target="_blank"></a>
But, when there is no images on url('url to image') (This is a border case, but we must to resolve it), the banner doesn't appears (that's good, it gave us the flexibility to remove banners simply deleting the image in the server), BUT the link continues to work.
EDIT: So, what I need to do is: detect that there is no image on
background: url('url to image') repeat-x center center
and in that case change the height: 71px; to height: 0px; I know that I can do this in javascript, but because the site is not mine, I want to know if I could do this in less before offer them a javascript solution.