Search
 
SCRIPT & CODE EXAMPLE
 

CSS

how to install tailwind css in html

    
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
    
Comment

install tailwind css

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init
Comment

tailwind css installation

   				  /*Follow the commands for Tailwind CLI*/
1. Initialize a node project in your directory:
           npm init -y
           
2. Install tailwindcss as a devDependency: 
           npm i -D tailwindcss
           
3. Install vs code plugin: Tailwind CSS IntelliSense (not for terminal)

4. Create a configuration file for tailwindcss: 
           npx tailwindcss init
           
5. Create src and output folder in root.

6. In src folder create a file named tailwind.css / (anyname).css

7. In src/tailwind.css write these : 
           @tailwind base;
           @tailwind components;
           @tailwind utilities
8. Create a folder named .vscode and ini this folder create a file 
   named settings.json. 
   
9. And paste this: 
           {
           	 "css.validate": false, 
             "tailwindCSS.emmetCompletions": true
           }
  this setting will help to not get erron after writing css

10. In scritps property in package.json file write a build property:

  "scripts": 
      "build": "tailwindcss -i ./src/tailwind.css -o ./output/tailwind.css -w"
      
11. Link tailwind in HTML like this href="./output/tailwind.css"

12. Now build tailwind: 
			npm run build 

13. Now you just have on task to complete which is content configuration: 
    See the configuration from here: 
         https://tailwindcss.com/docs/content-configuration
Comment

installation tailwind css in html

npx tailwindcss -i style.css -o tailwind.css
Comment

PREVIOUS NEXT
Code Example
Css :: mysqli load result into array 
Css :: css set background color 
Css :: css textarea set max characters 
Css :: css tbody full width 
Css :: line middle text css 
Css :: live sass compiler settings 
Css :: autocomplete widget not working in modal popup 
Css :: h2 in px css 
Css :: css vendor prefixes 
Css :: nth of type for every 4th after the 1st 
Css :: css selector color 
Css :: sass import variable from another file 
Css :: center div with flexbox 
Css :: import font css from url 
Css :: animation fade in css 
Css :: blur background css 
Css :: @fontface otf 
Css :: gradient over background video 
Css :: add background video to div css 
Css :: remove clicked button border 
Css :: what does em stand for in css 
Css :: css background transparent blur 
Css :: flex grow 
Css :: Hide second occarrence of a css class 
Css :: how to remove underline from hyperlink css 
Css :: remove outline 
Css :: smooth button effect css 
Css :: for...in...loop 
Css :: ckeditor push text in front of cursor 
Css :: details summary hide arrow 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =