Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cards fail if the text contains an icon #354

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Buuhuu
Copy link
Contributor

@Buuhuu Buuhuu commented Apr 19, 2024

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:

Copy link

aem-code-sync bot commented Apr 19, 2024

Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant