image
image copied to clipboard
docs: supplement responsive usage
โ Type of change
- [x] ๐ Documentation (updates to the documentation or readme)
- [ ] ๐ Bug fix (a non-breaking change that fixes an issue)
- [ ] ๐ Enhancement (improving an existing functionality)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
Try to help beginners use <NuxtImg>'s responsive features.
I changed the example below <NuxtImg>'s sizes property:
<!-- before -->
<NuxtImg
src="/logos/nuxt.png"
sizes="100vw sm:50vw md:400px"
/>
<!-- after -->
<NuxtImg
src="/logos/nuxt.png"
sizes="300px sm:50vw md:400px"
/>
And I recommend giving a pixel value for the default size.
If you use 100vw as the default size, you will get srcsets of 1w and 2w which do not make sense.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 7.02%. Comparing base (62998ab) to head (1ad4292).
:warning: Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1642 +/- ##
=====================================
Coverage 7.02% 7.02%
=====================================
Files 77 77
Lines 3575 3575
Branches 138 138
=====================================
Hits 251 251
Misses 3276 3276
Partials 48 48
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.