Skip to content

Commit

Permalink
feat: Update class safelist for darkmode support
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbearman committed Jul 11, 2024
1 parent a9a35fe commit 629c259
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,47 @@ const plugin = withOptions(

return {
safelist: [
// For the Badge component
"bg-gray-100",
"dark:bg-grayCool-800",

// 50 is for the Badge component
// 500 is for the Dot component
{
pattern: /^bg-\w+-(50|500)$/,
},

// For the Badge component
{
pattern: /^border-\w+-(600)$/,
pattern: /^bg-\w+-900$/,
variants: ["dark"],
},

// For the Badge component
{
pattern: /^border-\w+-600$/,
},

// For the Badge component
{
pattern: /^border-\w+-300$/,
variants: ["dark"],
},

// 600 is for the Paragraph component
// 700 is for the Badge component
{
pattern: /^text-\w+-(600|700)$/,
},

// For the Badge component
"dark:text-grayCool-200",

// For the Badge component
{
pattern: /^text-\w+-100$/,
variants: ["dark"],
},
],
theme: {
colors: palette,
Expand Down

0 comments on commit 629c259

Please sign in to comment.