Skip to content

Yosef-Ali/Tailwind-css-tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailwind-css-tutor best practice

  1. npm init -y
  2. npm install tailwindcss postcss-cli autoprefixer
  3. create css/tailwind.css file and pest this codes
@tailwind base;

@tailwind components;

@tailwind utilities;
  1. Run npx tailwindcss init

  2. create postcss.config.js file in the root folder pest

module.exports = {
  plugins: [
    // ...
    require('tailwindcss'),
    require('autoprefixer'),
    // ...
  ]
}
  1. change the scripe in the packege.json
"scripts": {
		"build": "postcss css/tailwind.css -o public/build/tailwind.css "
	},
  1. run npm build

important responsive utility tags

mx-auto, max-w-md, sm:max-w-xl

About

best practice responsive hero section

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages