You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a .gitignore file to a directory referenced by a @source directive in a Tailwind CSS source file causes the referenced directory to be ignored.
I discovered this because the uv Python packaging tool creates a .gitignore in the .venv directory it uses and I couldn't @source a template directory within it. Manually deleting .venv/.gitigore fixes the issue.
The text was updated successfully, but these errors were encountered:
I went over that documentation pretty carefully while I was trying to figure out why I wasn't picking up template sources. I think this is still a bug.
Works with one .gitignore:
.
├── .gitignore # ignores ignored/ dir
├── base.css
├── ignored
│ └── template.html # works as documented, @source will pick up classes
├── package-lock.json
├── package.json
├── README.md
└── test.html
Does not work when second gitignore is present in ignored directory:
.
├── .gitignore # ignores ignored/ dir
├── base.css
├── ignored
│ ├── .gitignore # adding this, ignores *
│ └── template.html # this will not be seen by @source
├── package-lock.json
├── package.json
├── README.md
└── test.html
What version of Tailwind CSS are you using?
v4.0.0-beta.8
What build tool (or framework if it abstracts the build tool) are you using?
None, using CLI
What version of Node.js are you using?
v20.18.1
What browser are you using?
N/A
What operating system are you using?
tested on macOS and Linux
Reproduction URL
https://github.com/jhh/tailwind-gitignore
Describe your issue
Adding a .gitignore file to a directory referenced by a @source directive in a Tailwind CSS source file causes the referenced directory to be ignored.
I discovered this because the uv Python packaging tool creates a
.gitignore
in the.venv
directory it uses and I couldn't@source
a template directory within it. Manually deleting.venv/.gitigore
fixes the issue.The text was updated successfully, but these errors were encountered: