mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 19:57:55 +01:00
@@ -19,13 +19,16 @@ export default defineNuxtPlugin(() => {
|
|||||||
const root = computed(() => {
|
const root = computed(() => {
|
||||||
const { neutral, ...colors } = appConfig.ui.colors
|
const { neutral, ...colors } = appConfig.ui.colors
|
||||||
|
|
||||||
return `:root {
|
return `@layer base {
|
||||||
|
:root {
|
||||||
${Object.entries(appConfig.ui.colors).map(([key, value]: [string, string]) => generateShades(key, value)).join('\n ')}
|
${Object.entries(appConfig.ui.colors).map(([key, value]: [string, string]) => generateShades(key, value)).join('\n ')}
|
||||||
|
}
|
||||||
|
:root, .light {
|
||||||
${Object.keys(colors).map(key => generateColor(key, 500)).join('\n ')}
|
${Object.keys(colors).map(key => generateColor(key, 500)).join('\n ')}
|
||||||
}
|
}
|
||||||
.dark {
|
.dark {
|
||||||
${Object.keys(colors).map(key => generateColor(key, 400)).join('\n ')}
|
${Object.keys(colors).map(key => generateColor(key, 400)).join('\n ')}
|
||||||
|
}
|
||||||
}`
|
}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user