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

Output image without wrapping in a div #43

Open
steverydz opened this issue Mar 2, 2020 · 2 comments
Open

Output image without wrapping in a div #43

steverydz opened this issue Mar 2, 2020 · 2 comments

Comments

@steverydz
Copy link

Currently the image template outputs the image wrapped in a div. When using a pattern such as the heading icon this can cause problems. Ideally we should be able to output an image without a container, even if this is an option rather than a default.

@tbille
Copy link
Contributor

tbille commented May 6, 2020

We found a way around it.

@tbille tbille closed this as completed May 6, 2020
@bartaz bartaz reopened this Apr 19, 2023
@bartaz
Copy link
Member

bartaz commented Apr 19, 2023

I think it's still a valid issue, I just noticed this causing problems with heading-icon component when migrating to new typography styles.

In some components in Vanilla we style images directly (for example in heading-icon component), image template adds a div wrapper around the image causing unexpected issues with flexbox (because the div is now a child element not an image).

From readme it seems that this div is added to support some kind of lazy loading plugin - are we even using it?

And it seems that these days native lazy loading via loading="lazy" is practically available in all major browsers, so we should be fine relying on that: https://caniuse.com/loading-lazy-attr

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

No branches or pull requests

3 participants