#Problem with tailwindcss/forms
45 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
Show a preview of
⚜️ tailwind.config
⚜️ your css file
global.css :
@tailwind components;
@tailwind utilities;
:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
}
@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
}
body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}
Could the problem be at the tree level of my project? the pages folder containing the files is at the root of the project and in my config this is different
I think first lines should look like this👇
Try renaming first your tailwind.config.ts into a different name like TEST or whatever you want and perform again the tailwind initialization command in a terminal pointing to your projet directory
Also check you have well import globals.css
Could you share the repo if possible? I need to check the structure of the entire repo
If unable, could you make a minimal reproduction repository that reproduces the problem?
my repo is private
can you make a "minimal" repo that isn't private 
otherwise give me your git hub nicknames and I will add you temporarily
personally, we prefer minimal as we don't need your whole code (unnecessary and waistful when you can give simple)
also don't need to add me as i am not even part of this convo
👌
I cloned my repo in public you can watch it
- If you use tailwind.config.ts I think you’re supposed to follow the esm import/export syntax

- (Likely the source of the problem) Why do you have pages outside src and app inside src?
Are you trying to use the pages router?
If you want to use the pages router, you need to create pages/_app.tsx and import the css file there as well
Also put pages and app at the same level if you want to use both of them at the same time. (pages and app) or (src/pages and src/app)
we agree that the page folder must be located in the src/app folder
No. src/pages
ok
and what is in my pages folder which is in src/app/pages will go directly to src/pages
Yes just move src/app/pages to src/pages
Can you access /dashboard now
Btw since you seem to not use the app router just remove src/app entirely
my next project does not want to remove app from my src/app nor rename it
remove src/app and replace wirh src/pages
So you do use the app router? Then you can keep it, I thought you don’t need it
But change src/app/pages to src/pages because you are trying to use the pages router and src/app/pages is not gonna work
delete or rename app is not possible
I am not telling you to delete or rename app
I’m telling you to move the pages directory from inside app/ to outside it
my pages folder must be outside of src/app
Ok idk then, best of luck