#How can i link my tailwindcss to next.js repo
25 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)
tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
},
plugins: [],
};
postcss.config.js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
}
module.exports = nextConfig
../pages/index.tsx
import type { NextPage } from 'next'
import Head from 'next/head'
const Home: NextPage = () => {
return (
<div>
<Head>
<title>VALLIANTY</title>
</Head>
<h1 className='p-10 text-red-500'>test</h1>
</div>
)
}
export default Home
but u just dont know why h1 element didnt change color and font-size
iirc postcss.config.css should be postcss.config.js
tailwind by default resets styles, so you have to specify the size manually
he probably had typo IG
Nah wait the author to describe more about his issue, he didn't said tailwind css not working, but instead
h1 element didnt change color and font-size
but surly it can't work if the postcss file is not existent...?
yeah~
Tailwind CSS does a Preflight, it resets the default styles of heading elements. You have to do:
<h1 className="text-xl">Hello World</h1>
So that you can get the same look cross browsers/platforms
@uneven sky U followed all steps? in that guide
This question has been marked as answered! If you have any other questions, feel free to create another post
[Click here](#1156537008466972702 message)
i think yes
i read the documents the whole night yesterday
alright restart magic 
the old saying have you tried turning it on and off again

think we should add this to Next.js faq, it helps a lot
thank u guys~~