Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Aug 3, 2023
1 parent a83429a commit f5137f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default defineNuxtModule<ModuleOptions>({
800: 'rgb(var(--color-primary-800) / <alpha-value>)',
900: 'rgb(var(--color-primary-900) / <alpha-value>)',
950: 'rgb(var(--color-primary-950) / <alpha-value>)',
DEFAULT: 'rgb(var(--color-primary-default) / <alpha-value>)'
DEFAULT: 'rgb(var(--color-primary-DEFAULT) / <alpha-value>)'
}

if (globalColors.gray) {
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/plugins/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export default defineNuxtPlugin(() => {

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

0 comments on commit f5137f7

Please sign in to comment.