#astro tailwindcss not loading

1 messages · Page 1 of 1 (latest)

craggy frigate
#

hi my astro tailwindcss isnt loading i followed teh astro guidelines but the css wont load

stoic willow
verbal garnet
#

try checking your astro.config.mjs file and see if it has this

stoic willow
#

^ that’s a nice pic

verbal garnet
stable wolf
#

Try using a global layout with the CSS import with the tailwind directives:
@tailwind base;
@tailwind components;
@tailwind utilities;

and in tailwind.config.mjs

content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
torpid solar
#

I am also having issues with this, but it might be caused by my usage of bun?

#

but also tailwind not being built/included for this new project spin up

stable wolf
#

Hello, I just ran bunx astro add tailwind with bun 1.0.3 on wsl ubuntu and I had no problems

torpid solar
#

Only difference for us would be wsl debian.. using bun I can't imagine any other relevant dependancy differences

stable wolf
#

totally, have you already tried installing tailwind manually? (my english is quite bad, sorry)

torpid solar
#

Yep. Still no styles are loaded.

torpid solar
craggy frigate
#

i reinstalled tailwind as well but still not reading the class

stoic willow
#

Also are you both using windows?

stoic willow
craggy frigate
#

no errors in console

stoic willow
#

Ok I’ll test it later

#

Link Repo is 404 for me?

stable wolf
stable wolf
#

and when installing tailwind

#

by the way, use the version 1.0.18 that you have

craggy frigate
stable wolf
#

but likewise, add the following to your project:

src/styles/some-name.css

@tailwind base;
@tailwind components;
@tailwind utilities;

and in the layouts add the import:

---
import '../styles/some-name.css';
---
stoic willow
#

The tailwind integration does that for you by default unless you change the applybasestyles option in config