-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style rgb variables for error/warning/success #152
Comments
I think this is nice however I've already provided the ability to create custom css variables through the ThemeProvider for this very reason that i figured the default wouldn't be exactly what everyone would need:
Then use |
Yes and no. Cause those colours can potentially not adhere to any custom theme. As well as the "text color", for proper contrast. I can not assume that the |
Gotcha, makes sense, I'll implement something a bit smarter for those colours! |
FYI these variables are now available as rgba from 0.1 through to 1 with 10 stops, there is also a contrast color but really, they're all white except the yellow one and they're not calculated dynamically currently, it's something i want to work on with the theme it's not where i want it to be |
Currently there are already style variables for the "alerts":
However, these are quite limited and do not provide
rgba
alternatives.As well as the fact that the contrast color is missing, as far as I can tell.
Seeing these are variables, potentially even set by a Theme, these can vary.
A good example is the warning color, some themes make them more "yellow" and then white is not a viable text color.
The reason I am requesting this, is because I made a custom "update" card, which indicates if an update is up-to-date or not.
For those use-cases, I would like to use the "success" and "warning" colours, which I currently add myself.
I also provide a "feedback"-icon, for a custom "Reload all YAML"-card. Where I show a "success"-icon, and currently hardcode the text/icon color to white. But preferably this should be a css variable as well.
So I would suggest:
The text was updated successfully, but these errors were encountered: