Skip to content

cookingBird/tailwind-create-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

tailwind-create-theme

定义一个Tailwind 主题

Usage

step first

npm install -D tailwind-create-theme

step second

//tailwind.config.js

const { createTheme } = require('tailwind-create-theme')

const plugin = require('tailwindcss/plugin')

module.exports={

mode:'jit',

plugins:[plugin(createTheme ('dark'))]

}

Then

接下来你就可以在CSS中使用dark:w-4这样的tailwind语法了;

如果需要切换主题,那么你只需要:

onClick(()=>{

document.body.setAttribute('class','dark')

})

About

create a theme by self

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published