Skip to content

Commit

Permalink
docs(ui): also add the --color-primary-DEFAULT variable
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Sep 7, 2023
1 parent c6056ed commit ad0fe23
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/plugins/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ export default defineNuxtPlugin({

return `:root {
${Object.entries(primary || colors.green).map(([key, value]) => `--color-primary-${key}: ${hexToRgb(value)};`).join('\n')}
--color-primary-DEFAULT: var(--color-primary-500);
${Object.entries(gray || colors.cool).map(([key, value]) => `--color-gray-${key}: ${hexToRgb(value)};`).join('\n')}
}`
}
.dark {
--color-primary-DEFAULT: var(--color-primary-400);
}
`
})

if (process.client) {
Expand Down

0 comments on commit ad0fe23

Please sign in to comment.