#astro tailwindcss not loading
1 messages · Page 1 of 1 (latest)
Could you show your Astro config file ?
try checking your astro.config.mjs file and see if it has this
^ that’s a nice pic
@stoic willow Thanks! I use CodeSnap for VSCode - https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap
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}'],
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
Hello, I just ran bunx astro add tailwind with bun 1.0.3 on wsl ubuntu and I had no problems
Only difference for us would be wsl debian.. using bun I can't imagine any other relevant dependancy differences
totally, have you already tried installing tailwind manually? (my english is quite bad, sorry)
Yep. Still no styles are loaded.
im using latest bun btw 1.0.18, can you show init for new project as well?
i reinstalled tailwind as well but still not reading the class
that config is right, when you start the dev server and view a page that should have tailwind css applied to it do you get any errors? Can you also show an example of how you’re applying the classes? I’m also assuming you’re using the default tailwind config?
Also are you both using windows?
Any Astro project you should be able to install “<@&1055234544183287879>/tailwind” package then add it to integrations in Astro config, create a tailwind config and the run the dev server and see your styles applied even if the add integration command is failing to do all that automatically for you
im using windows, i uploaded my files to this repo: https://github.com/philsav/Astro/tree/master
no errors in console
404 for me too
and when installing tailwind
by the way, use the version 1.0.18 that you have
apologies it was set to private, have made the repo public:
Hi! I just cloned the repo and simply installed the dependencies, then I just added tailwind classes in the tags and it worked without problems...
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';
---
The tailwind integration does that for you by default unless you change the applybasestyles option in config