Closed MickL closed 2 days ago
Hi @MickL 🙏
You can take a look at this: https://ui.nuxt.com/getting-started/theming#smart-safelisting
You will need to define it as a safe list since it is a dynamic prop.
This is what I did. But it ends up in a very large list. Is this really the only option? Why do I have red font and green font if they are also dynamic?
@MickL
export default defineNuxtConfig({ ui: { safelistColors: ['green', 'yellow'] } })
@MickL You can also comment in your code // <UBadge color="green" />
for example so the parser knows to safelist the green
classes for the Badge component.
Thanks!
Environment
Version
2.18.4
Reproduction
https://github.com/MickL/nuxtui-colors-bug
Description
When the color prop is created dynamically, some css styles are not generated, especially for subtle and soft variants:
For example,
subtle
badges dont have correct border color and the background colors are missing:It should look like this:
In my reproduction repo I used a table: