-
-
Notifications
You must be signed in to change notification settings - Fork 966
Closed
Description
Clear and concise description of the problem
I have multiple CSS files that I process and add them to UnoCSS via rules or preflights.
I am finalizing migrating the content to the new colors structure. Some of the colors are defined in the CSS files only and added via preflights so the theme is not aware of those keys and does not generate the CSS variables.
Suggested solution
import { createRemToPxProcessor } from '@unocss/preset-wind4/utils'
import { defineConfig, presetWind4 } from 'unocss'
export default defineConfig({
presets: [
presetWind4({
preflights: {
theme: {
safelist: ['colors:blue-500'], // will add --colors-blue-500 to :root
}
},
}),
],
})Alternative
I am not really sure how to solve this in a clean way... I am trying something, but it is not working. See playground
- Setting
mode:true
Additional context
No response
Validations
- Read the Contributing Guidelines.
- Read the
README.mdof using the package. - Already used the Interactive Docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels