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

max-width is unsopported #89

Open
Metis77 opened this issue Aug 31, 2023 · 5 comments
Open

max-width is unsopported #89

Metis77 opened this issue Aug 31, 2023 · 5 comments

Comments

@Metis77
Copy link

Metis77 commented Aug 31, 2023

While using max-width or min-width should both be fine for the sizes attribute, only the approach with min-width validates.

@Metis77 Metis77 closed this as completed Aug 31, 2023
@ausi
Copy link
Owner

ausi commented Sep 1, 2023

Were you able to resolve the issue as you closed it already?

@Metis77
Copy link
Author

Metis77 commented Sep 1, 2023

No, but the reason for my issues where another.
I now think it is js repaint/render related.

Whenever images get layed out by js, for example in a Slider or Masonry, your script seams to analyse to soon.
so it gets the final rendered sizes wrong. (claims image does not match sizes, while it does)

Not sure, if there would be a solution to this.

@ausi
Copy link
Owner

ausi commented Sep 1, 2023

Maybe we could try to trigger a resize event manually here:

setStyles(iframe, {
width: width + 'px',
height: height + 'px',
});

@ausi ausi reopened this Sep 1, 2023
@Metis77
Copy link
Author

Metis77 commented Sep 1, 2023

If it helps, I came across this issue white testing the slider on: https://relaunchlive.granvogl.com/

@peter-neumann-dev
Copy link

I also experienced this with other sliders from splide.js or slick slider library. During testing, I always used a single slide only because if the slides are changing automatic during the linting process, of course they will get wrong because the image is maybe hidden or even removed from the DOM.

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