Skip to content

Commit

Permalink
added safelist to tailwind config
Browse files Browse the repository at this point in the history
  • Loading branch information
LiveDuo committed Mar 28, 2024
1 parent e3d7d78 commit cb57928
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lib/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
const colors = [
'slate',
'gray',
'zinc',
'neutral',
'stone',
'red',
'orange',
'amber',
'yellow',
'lime',
'green',
'emerald',
'teal',
'cyan',
'sky',
'blue',
'indigo',
'violet',
'purple',
'fuchsia',
'pink',
'rose',
]
const weights = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]

module.exports = {
content: ['./client/**/*.{js,ts,jsx,tsx,html}', './themes/**/**/*.{js,ts,jsx,tsx,html}'],
theme: {
Expand All @@ -7,6 +33,10 @@ module.exports = {
},
},
},
safelist: [
{ pattern: new RegExp(`bg-(${colors.join('|')})-(${weights.join('|')})$`) },
{ pattern: new RegExp(`text-(${colors.join('|')})-(${weights.join('|')})$`) },
],
variants: {},
plugins: [],
}

0 comments on commit cb57928

Please sign in to comment.