-
Notifications
You must be signed in to change notification settings - Fork 256
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
Bug in NuxtImg sizes configuration: Incorrect default size assignment #1331
Comments
This is expected behaviour. Like tailwind responsive prefixes, the 'default' value applies to all configurations, then See #977. |
Either you didn't understand me, or I don't even know.
That is, it is planned that for such a configuration 100vw will be for everyone, sm:50vw - the sm prefix for 50vw, md:400px - the md prefix for 400px in HTML, it should look something like but in fact, the pairs are created not through ":", but through a space, and are separated by ":". I tested many times, check it yourself. Either the documentation is incorrect, or the logic |
This means that for the following configuration:
the output should be The key phrases are 'up until' and 'and up'. If you think the docs are unclear, I would love to hear your suggestions for improving them. 🙏 |
Sorry, my English isn't good enough, and translators sometimes lose context. I only now understood what you were talking about. Thank you for clarifying. |
Description
There seems to be a misconfiguration issue with how
NuxtImg
handles thesizes
attribute, particularly with the assignment of default and conditional sizes based on breakpoints.Issue
According to the documentation, the
sizes
attribute should allow a space-separated list where each entry specifies a screen size/width pair. The behavior should be that if no screen size prefix is used (likesm:
), then that size is taken as the default. However, when specifying sizes as in the example below, the actual behavior observed does not match the expected:Expected behavior:
Actual behavior:
This leads to inconsistent and unexpected image sizing across different device breakpoints.
The text was updated successfully, but these errors were encountered: