sanity-io / sanity-template-nextjs-landing-pages

A Sanity powered landing page builder in Next.js for https://sanity.io/create
https://www.sanity.io/create/?template=sanity-io%2Fsanity-template-nextjs-landing-pages
158 stars 54 forks source link

Add Tailwind CSS to this template #47

Open lmuzquiz opened 4 years ago

lmuzquiz commented 4 years ago

Hi, i am trying to add TailwindCSS to this template but i haven't succeeded yet

Screen Shot 2020-11-24 at 16 32 22

I've installed: "autoprefixer": "^9.8.6", "postcss": "^7.0.35", and "tailwindcss": "^2.0.1-compat" within the web folder.

also i've created the file tailwind.css within /web/styles folder.

Screen Shot 2020-11-24 at 16 34 52

Then i imported the css file on /web/pages_app.js

Screen Shot 2020-11-24 at 16 35 51

Finally i configured the postcss.config.file within the web folder.

Screen Shot 2020-11-24 at 16 36 39

Still not working.

I have tried many changes on the postscss.config.js file such as:

Screen Shot 2020-11-24 at 16 37 42

Without any succes. I am not getting any errors, it's just that the classes are being added to the html, but the styles are not being applied. Hope someone can help. Thanks in advanced.

LinnJS commented 2 years ago

@lmuzquiz you probably dont need this anymore but if you do here you are 😃

https://github.com/sanity-io/sanity-template-nextjs-landing-pages/issues/65#issuecomment-1216875362