Since icons :icon-name: are rendered as <span class="icon icon-icon-name"></span> and decorated with <span class="icon icon-icon-name"><img ...></span> now, querying all <img> in the list of cards and assuming they all have a closest <picture> is wrong. It will fail for the icon <img> and the cards block will be broken.
With this change I limit the selector to <img> that actually have a <picture> parent.
Since icons
:icon-name:
are rendered as<span class="icon icon-icon-name"></span>
and decorated with<span class="icon icon-icon-name"><img ...></span>
now, querying all<img>
in the list of cards and assuming they all have a closest<picture>
is wrong. It will fail for the icon<img>
and the cards block will be broken.With this change I limit the selector to
<img>
that actually have a<picture>
parent.Test URLs: