baseweb
baseweb copied to clipboard
Rating Colors not configurable in v11
Previously you could override the rating200 and rating400 theme colors for the Rating component, but this was removed for the v11 release as the colours were deprecated. The colours are now warning200 and warning400 which at first glance appear wholly inappropriate to change if you want to theme the stars.
Because the stars are SVGs created as a url in the content in an :after pseudo element this makes it (AFAICT) impossible to adjust the colours of the rating stars.
https://github.com/uber/baseweb/commit/7cd097fd0d9b3c58833a3893c491908d48869066
Current Behavior
Stars themed with warning200 and warning400.
Expected Behavior
I can override the Rating Star colours via the theme.
Your Environment
| Tech | Version |
|---|---|
| Base UI | v11.0.3 |
| React | |
| browser |
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
I agree. I had projects where the designer wanted the stars in grayscale, but we shouldn't affect the entire warning palette. So I had to wrap the StarRating around a ThemeProvider.