Replies: 1 comment
|
Thanks fore porting, I'll change the transparent colors back to their previous values |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Setting any component to
variant="transparent"and a color without a specific shade renders the component using thevar(--mantine-color-{color}-light-color)color.In v8, this maps to shade 3 in dark mode, and shade 6 in light mode by default. In v9, this now instead maps to shade 0 in dark mode, and shade 9 in light mode.
This means in v9, in dark mode, everything appears white and the color prop does nothing unless a shade is specified (which I'd like to avoid repeating everywhere). In light mode, everything appears near-black, which isn't exactly helpful in most cases either.
Using
Buttonas an example (this can be easily replicated in the docs):v8 light mode - uses blue.6
v8 dark mode - uses blue.3
v9 light mode - uses blue.9 (almost black)
v9 dark mode - uses blue.0 (white)
I'm not sure if this even counts as a bug since the CSS var changes themselves are likely intentional, and it makes sense to say the "color" prop refers to the background instead of the foreground (text/icon). But this doesn't feel intuitive as the the default behavior for the library.
I understand I can write my own color resolver to deal with this, but wondering if this is something worth looking at for the library as a whole.
All reactions