You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please tell me if this will help solve the following problem:
Often, I need to have a picture element in advance to apply a class to it.
.intro__picture {}
But this leads to a nested picture element appearing in the markup after the plugin has processed it.
<pictureclass="intro__picture"><!-- My picture element --><picture><!-- The picture element from 11ty plugin --><img/></picture></picture>
As a result, I have to remove the picture element I wrote and rely on the one created by the plugin after it processes. However, writing styles in this case becomes difficult.
.intropicture {}
Sometimes, there is more than one image in a block, which means additional wrappers need to be created, etc. It seems to me that it would be good if the picture element that appears after the plugin is processed either took all the attributes from the current picture element, or if the plugin completely ignored creating a picture element if one already exists in the markup.
zachleat
changed the title
Eleventy Transform: ignore <img> inside of <picture> with other sources.
Eleventy Transform: transform <img> inside of <picture> with other sources.
Dec 20, 2024
Or better: optimize and replace instances of
<picture>
.#208
The text was updated successfully, but these errors were encountered: