enhanced:img issue with row-span-3 and aspect-square
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
Whenever I use enhanced:img with these 2 tailwind classes: row-span-3 and aspect-square, they're being ignored. If I use regular img it works as expected. Tried in both dev and prod - same issue.
Reproduction
I've made a reproduction on Stackblitz, but unfortunately Stackblitz doesn't work with enhanced:img for some reason. You can download it and try locally: https://stackblitz.com/edit/sveltejs-kit-template-default-4jhpwv?file=src%2Froutes%2F%2Bpage.svelte
Logs
No response
System Info
npmPackages:
@sveltejs/adapter-auto: ^3.0.0 => 3.3.0
@sveltejs/adapter-auto: ^3.0.0 => 3.3.0
@sveltejs/enhanced-img: ^0.3.10 => 0.3.10
@sveltejs/kit: ^2.0.0 => 2.7.2
@sveltejs/kit: ^2.0.0 => 2.7.2
@sveltejs/vite-plugin-svelte: ^4.0.0 => 4.0.0
svelte: ^5.0.0 => 5.1.0
svelte: ^5.0.0 => 5.1.0
svelte: ^5.0.0 => 5.1.0
svelte: ^5.0.0 => 5.1.0
vite: ^5.0.3 => 5.4.10
Browsers:
Edge: Chromium
npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.8.0 - ~\AppData\Local\pnpm\pnpm.CMD
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
Binaries:
Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
Severity
serious, but I can work around it
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the local reproduction from src/routes/+page.svelte and compare enhanced:img with regular img using row-span-3 and aspect-square. Verify whether the classes are preserved and applied in the enhanced image path; done means both classes affect the rendered image as they do with img.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, tailwindcss
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100