-
Notifications
You must be signed in to change notification settings - Fork 844
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
Code looks jarring within tooltip #1131
Comments
Yep, not so hot. We've tried to stay away from opacity when possible for performance and accessibility reasons. Not that one piece of opacity can cause problems, but when it becomes a habit and lots of elements on the page use it, things can bog down a bit. It's also hard to do contrast audits / manipulations with opacity. You probably remember, but we used to have the ability to set the theme for code blocks so it had a "dark" theme. I think I'd prefer something like that for this situation. Ends up being a slipery slope if every component needs an invert mode though. |
Also, somewhat related. the |
I'd generally say in that example the callout and the error should be separated. |
The problem with making the code block's background transparent is that it still wouldn't work on dark backgrounds since the text would still be black. So instead of dark tooltip, light gray then black text, it would be dark tooltip, dark gray, black text. There'd be a total lack of contrast. I think we just need to be able to send a prop to the codeblock to "invert" colors to essentially render the dark mode color version. |
Yeah, I was more mentioning that the Agree the invert is the direction to go here. |
We should also consider that people will find a use-case for I have an idea... how about we add a |
@cjcenizal do you mean that for the background? I assume not for the text? |
Yeah for the background mostly. Up to you designers to decide if the text should change color too. 😄 |
This will be resolved when we finally have a color mode context with Emotion and can full reverse theme in tooltips. So I'm closing this one in favor of that Meta #3912 |
The light background makes the code contrast too sharply against the tooltip's background color. If we used opacity for the code background then it would blend nicely.
The text was updated successfully, but these errors were encountered: