sveltejs / sveltejs/cli

tests: bump `create-vite`

Open
#1,123 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pkg:add pkg:create
Dominant language
TypeScript
Stars
506
Forks
107
Avg merge
5d 15h
Merged PRs (30d)
28

Description

We tried bumping create-vite in #1115 but this caused strange side-effects while testing the tailwind integration.

AI summary of our conversation yesterday:

There seems to be a regression/difference in the create-vite template that affects Tailwind spacing utilities.

In one template, mt-1 resolves to 4px, while in the create-vite template it resolves to 4.25px. Initially this looked related to the --spacing CSS variable, but after testing, the actual cause appears to be the template’s global font shorthand:

font: 18px/145% var(--sans);

Because Tailwind spacing utilities are rem-based, setting the root/base font size to 18px scales utilities like mt-1 from the expected 4px to 4.5px / similar values depending on the setup.

This does not happen in the SvelteKit template, so the create-vite template seems to be applying global font styles differently. Updating create-vite was skipped for now because even create-vite@8.3.0 already has this behavior. We likely need to bisect the template changes to see when and why this was introduced.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the create-vite template behavior described in the issue and the existing Tailwind integration tests, then compare template changes across create-vite versions. Bisect when the global font shorthand was introduced and verify the expected spacing utility values in the affected integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
tailwindcss, typescript, vite
Domain
build-system, cli, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.