#19801 reported that source detection does not honour several of git's ignore sources. It was closed as completed on 2026-03-20, but #19829 fixed the Invalid code point crash that report also described rather than the ignore-scope behaviour, and the closing comment asked for a reproduction if ignore rules were not taking effect as expected. Here is a minimal one.
Reproduced on v4.3.1 with @tailwindcss/cli, and separately with the standalone binary vendored by tailwindcss-ruby, so it is not specific to the Vite plugin.
Now it is not scanned. The only thing that changed is which git ignore source carries the rule.
An arbitrary value is deliberate here. A plain utility name like saturate-150 gives a false positive, because it also occurs inside node_modules and @source "./" picks it up from there.
Which sources are honoured
Same repository, same @source "./", src/ excluded three ways. git check-ignore reports the file ignored in all three.
src/ excluded by
scanned
in-tree .gitignore
no
.git/info/exclude
no
core.excludesFile
yes
.git/info/exclude is honoured, which #19801 listed as broken. core.excludesFile is the one that is not.
Unchanged since at least a4be983, the commit referenced in #19801. If it is intended, the two consequences below seem worth documenting rather than leaving to be discovered, and this can be closed on that basis.
Why it may be worth reconsidering
gitignore(5) describes core.excludesFile as where a user puts "patterns which a user wants Git to ignore in all situations (e.g., backup or temporary files generated by the user's editor of choice)". That is the category most likely to sit inside a project directory and contain prose — editor state, scratch notes, an agent's working directory. Two things follow, both quiet.
The search that would find it cannot find it. The emitting file is one git ignores, so git grep returns nothing and the natural conclusion is that the class is unused. Finding it needs a plain recursive grep, which is not the reflex, because the point of the directory is that git does not see it.
Local and CI builds diverge with nothing failing. CI checks out no such directory, so it produces a different stylesheet from the developer's machine. Neither side errors.
In the case that led here, markdown files under a globally-ignored directory put rounded-full and a theme-token class into the stylesheet built on the developer's machine. Neither name appeared in any markup — only in prose describing the project. Prose is enough: a file containing no class attribute at all, holding only the sentence "The table was set out in the container, and the grid stayed visible while the static layout held its shape", emits .table, .grid, .visible and .static.
Workaround, for anyone who lands here
Move the entry from the global excludes into .git/info/exclude. It is per-repository, untracked, honoured by the scanner, and needs no change collaborators see. @source not also works and is the more visible option.
Note that neither helps if an explicit @source names the directory outright — @source "./src/" scans it even under an in-tree .gitignore, which is #18870 seen from the other side.