-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Selemondev
authored and
Selemondev
committed
Jul 30, 2023
1 parent
588d1d7
commit 3082fa9
Showing
3 changed files
with
25 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1 @@ | ||
import tailwindColors from './node_modules/tailwindcss/colors' | ||
|
||
const colorSafeList = [] | ||
|
||
// Skip these to avoid a load of deprecated warnings when tailwind starts up | ||
const deprecated = ['lightBlue', 'warmGray', 'trueGray', 'coolGray', 'blueGray'] | ||
|
||
for (const colorName in tailwindColors) { | ||
if (deprecated.includes(colorName)) | ||
continue | ||
|
||
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900] | ||
|
||
const pallette = tailwindColors[colorName] | ||
|
||
if (typeof pallette === 'object') { | ||
shades.forEach((shade) => { | ||
if (shade in pallette) { | ||
// eslint-disable-next-line no-unused-expressions | ||
colorSafeList.push(`text-${colorName}-${shade}`), | ||
colorSafeList.push(`accent-${colorName}-${shade}`), | ||
colorSafeList.push(`bg-${colorName}-${shade}`), | ||
colorSafeList.push(`hover:bg-${colorName}-${shade}`), | ||
colorSafeList.push(`focus:bg-${colorName}-${shade}`), | ||
colorSafeList.push(`focus:ring-${colorName}-${shade}`), | ||
colorSafeList.push(`border-${colorName}-${shade}`) | ||
} | ||
}) | ||
} | ||
} | ||
/** @type {import('tailwindcss').Config} */ | ||
export const safelist = colorSafeList | ||
export const content = ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'] | ||
export const theme = { | ||
extend: { | ||
colors: tailwindColors, | ||
}, | ||
} | ||
export const plugins = [require('@windi-ui/tailwind-config/tailwind.config')] | ||
// module.exports = require('@windi-ui/tailwind-config/tailwind.config') | ||
module.exports = require('@windi-ui/tailwind-config/tailwind.config') |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.