Search
 
SCRIPT & CODE EXAMPLE
 

CSS

add tailwind to next

# If you're on Next.js v10 or newer
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest

# If you're on Next.js v9 or older
npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
Comment

add tailwind to next

  // tailwind.config.js
  module.exports = {
-   purge: [],
+   purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
    darkMode: false, // or 'media' or 'class'
    theme: {
      extend: {},
    },
    variants: {
      extend: {},
    },
    plugins: [],
  }
Comment

add tailwind to next

/* ./styles/globals.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
Comment

tailwind css next

yarn add -D tailwindcss postcss autoprefixer
Comment

add tailwind to next

  // pages/_app.js
- import '../styles/globals.css'
+ import 'tailwindcss/tailwind.css'

  function MyApp({ Component, pageProps }) {
    return <Component {...pageProps} />
  }

  export default MyApp
Comment

add tailwind to next

// postcss.config.js
module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}
Comment

add tailwind to next

// pages/_app.js
import '../styles/globals.css'

function MyApp({ Component, pageProps }) {
  return <Component {...pageProps} />
}

export default MyApp
Comment

add tailwind to next

npx tailwindcss init -p
Comment

PREVIOUS NEXT
Code Example
Css :: td min-height not working 
Css :: generate css on scss save 
Css :: custom properties css 
Css :: page html css template 
Css :: css box-sizing 
Css :: initialize toast 
Css :: home page css 
Css :: id selector css 
Css :: text-shadow 
Css :: faire rectangle qui prend toute la largeur css 
Css :: mouse hold css effect 
Css :: what does it mean when we write width :100%? 
Css :: pink hex code 
Css :: ausgewählter text farbe ändern css 
Css :: how to remove underline from link 
Css :: truncate long line with dots 
Css :: make image has fixed height looks great 
Css :: pourquoi mon css ne fonctionne pas quand je recharge la page 
Css :: gravity form css 
Css :: fixed banner 
Css :: css initial letter chrome 
Css :: css address by id 
Css :: CSS REsize Wordpress Dropdowns Automatically 
Css :: vertical align x horizontal 
Css :: 1 412 779 in words 
Css :: 1.1 inches in pixels 
Css :: hwo to reload css in flask 
Css :: carousel inner item populate with for loop puting active class on all carousel item 
Css :: css zoom out image 
Css :: Use pkg_* Tools To Manage Packages 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =